STOP-LOSS-RSI with Edge-Preserving Filter Strategy V2Modified RSI strategy with entry and exit points. 
I have allowed for High and Low risk for anyone interested in using it (NO GUARANTEES. DO YOUR OWN RESEARCH). 
I will later consider incorporating the standard RSI for exit points. I am sure returns will increase based on current test runs :) 
Returns look good based on the strategy result.
Поиск скриптов по запросу "stop loss"
Custom Range Zones with EMA Alerts [wjdtks255]📊 Adaptive Target Tracker  
English Version
Indicator Description
The Adaptive Target Tracker is a trend-following indicator that integrates moving averages with an adaptive Average True Range (ATR) calculation to detect market trends with dynamic sensitivity. It clearly plots entry lines, multiple profit targets (T1, T2, T3), and stop-loss levels directly on the chart, providing traders with a vivid visualization of potential trade setups.
This indicator dynamically adapts to market volatility, effectively distinguishing between upward (long) and downward (short) trends. It reflects these states using distinct colored lines and labels, facilitating precise trade management and clear interpretation of market direction.
🔍 How It Works
Trend Detection: The indicator generates smoothed price bands by dynamically adding or subtracting the ATR from the moving average of both high and low prices.
Entry Signal: A long position is signaled when the closing price moves above the adaptive upper band. Conversely, a short position is indicated when the closing price drops below the adaptive lower band.
Visual Elements: For comprehensive guidance, the entry price, a clear stop-loss line (marked in red), and three progressively spaced profit target lines (depicted in blue) are all plotted directly on the chart.
Confirmation & Alerts: Entry signals are enhanced with visual arrows and corresponding labels: a green indicator for long entries and an orange one for short entries. These elements are designed to help pinpoint optimal trading opportunities.
Real-Time Update: The indicator's lines and labels continuously update and advance with the prevailing price action. Upon reaching a target level, a distinctive check mark appears, providing real-time feedback on trade progression.
💡 Trading Method
Entry: Initiate a long trade when the price closes above the adaptive upper band, signaled by a green entry line and label. For short trades, enter when the price closes below the adaptive lower band, indicated by an orange entry line and label.
Profit Targets: Utilize the three predefined target levels (T1, T2, T3) as strategic points for incremental profit-taking. These targets are intelligently calculated based on the entry price and ATR, ensuring they are dynamically adapted to current market volatility.
Stop Loss: Establish your stop loss at the red line. This line represents a calculated risk threshold, positioned below the entry for long trades and above it for short trades, to protect capital.
Management: Actively monitor the chart for the achievement of target levels, which are marked with a check symbol. Adjust your position exposure as needed to secure profits and effectively mitigate risk.
Customization: The indicator offers flexibility through adjustable parameters such as the trend window length and ATR offset. These can be fine-tuned to align with your individual trading style and preferred timeframes.
Summary
The Adaptive Target Tracker is an ideal tool for traders who value clear, visual trade signals combined with sophisticated multi-level exit strategies and volatility-adapted risk management. It excels at filtering out market noise, allowing traders to concentrate on significant trend movements. Furthermore, it provides practical, adaptive entry, target, and stop-loss functionalities applicable across a wide array of timeframes and asset classes.
Serenity Model VIPI — by yuu_iuHere’s a concise, practical English guide for Serenity Model VIPI (Author: yuu_iu). It covers what it is, how to set it up for daily trading, how to tune it, and how we guarantee non-repainting.
Serenity Model VIPI — User Guide (Daily Close, Non‑Repainting)
Credits
- Author: yuu_iu
- Producer: yuu_iu
- Platform: TradingView (Pine Script v5)
1) What it is
Serenity Model VIPI is a multi‑module, context‑aware trading model that fuses signals from:
- Entry modules: VCP, Flow, Momentum, Mean Reversion, Breakout
- Exit/risk modules: Contrarian, Breakout Sell, Volume Delta Sell, Peak Detector, Overbought Exit, Profit‑Take
- Context/memory: Learns per Ticker/Sector/Market Regime and adjusts weights/aggression
- Learning engine: Runs short “fake trades” to learn safely before scaling real trades
It produces a weighted, context‑adjusted score and a final decision: BUY, SELL, TAKE_PROFIT, or WAIT.
2) How it works (high level)
- Each module computes a score per bar.
- A fusion layer combines module scores using accuracy and base weights, then adjusts by:
  - Market regime (Bull/Bear/Sideways) and optional higher‑timeframe (HTF) bias
  - Risk control neuron
  - Context memory (ticker/sector/regime)
- Optional LLM mode can override marginal cases if context supports it.
- Final decision is taken at bar close only (no intrabar repaint).
3) Non‑repainting guarantee (Daily)
- Close‑only execution: All key actions use barstate.isconfirmed, so signals/entries/exits only finalize after the daily candle closes.
- No lookahead on HTF data: request.security() reads prior‑bar values (series ) for HTF close/EMA/RSI.
- Alerts at bar close: Alerts are fired once per bar close to prevent mid‑bar changes.
What this means: Once the daily bar closes, the decision and alert won’t be repainted.
4) Setup (TradingView)
- Paste the Pine v5 code into Pine Editor, click Add to chart.
- Timeframe: 1D (Daily).
- Optional: enable a date window for training/backtest
  - Enable Custom Date Filter: ON
  - Set Start Date / End Date
- Create alert (non‑repainting)
  - Condition: AI TRADE Signal
  - Options: Once Per Bar Close
  - Webhook (optional): Paste your URL into “System Webhook URL (for AI events)”
- Watch the UI
  - On‑chart markers: AI BUY / AI SELL / AI TAKE PROFIT
  - Right‑side table: Trades, Win Rate, Avg Profit, module accuracies, memory source, HTF trend, etc.
  - “AI Thoughts” label: brief reasoning and debug lines.
5) Daily trading workflow
- The model evaluates at daily close and may:
  - Enter long (BUY) when buy votes + total score exceed thresholds, after context/risk checks
  - Exit via trailing stop, hard stop, TAKE_PROFIT, or SELL decision
- Learning mode:
  - Triggers short “fake trades” every N bars (default 3) and measures outcome after 5 bars
  - Improves module accuracies and adjusts aggression once stable (min fake win% threshold)
- Memory application:
  - When you change tickers, the model tries to apply Ticker or Sector memory for the current market regime to pre‑bias module weights/aggression.
6) Tuning (what to adjust and why)
Core controls
- Base Aggression Level (default 1.0): Higher = more trades and stronger decisions; start conservative on Daily (1.0–1.2).
- Learning Speed Multiplier (default 3): Faster adaptation after fake/real trades; too high can overreact.
- Min Fake Win Rate to Exit Learning (%) (default 10–20%): Raises the bar before trusting more real trades.
- Fake Trade Every N Bars (default 3): Frequency of learning attempts.
- Learning Threshold Win Rate (default 0.4): Governs when the learner should keep learning.
- Hard Stop Loss (%) (default 5–8%): Global emergency stop.
Multi‑Timeframe (MTF)
- Enable Multi‑Timeframe Confirmation: ON (recommended for Daily)
- HTF Trend Source: HOSE:VNINDEX for VN equities (or CURRENT_SYMBOL if you prefer)
- HTF Timeframe: D or 240 (for a strong bias)
- MTF Weight Adjustment: 0.2–0.4 (0.3 default is balanced)
Module toggles and base weights
- In strong uptrends: increase VCP, Momentum, Breakout (0.2–0.3 typical)
- In sideways low‑vol regimes: raise MeanRev (0.2–0.3)
- For exits/defense: Contrarian, Peak, Overbought Exit, Profit‑Take (0.1–0.2 each)
- Keep Flow on as a volume‑quality filter (≈0.2)
Memory and control
- Enable Shared Memory Across Tickers: ON to share learning
- Enable Sector‑Based Knowledge Transfer: ON to inherit sector tendencies
- Manual Reset Learning: Use sparingly to reset module accuracies if regime changes drastically
Risk management
- Hard Stop Loss (%): 5–8% typical on Daily
- Trailing Stop: ATR‑ and volatility‑adaptive; tightens faster in Bear/High‑Vol regimes
- Max hold bars: Shorter in Bear or Sideways High‑Vol to cut risk
Alerts and webhook
- Use AI TRADE Signal with Once Per Bar Close
- Webhook payload is JSON, including event type, symbol, time, win rates, equity, aggression, etc.
7) Recommended Daily preset (VN equities)
- MTF: Enable, Source: HOSE:VNINDEX, TF: D, Weight Adj: 0.3
- Aggression: 1.1
- Learning Speed: 3
- Min Fake Win Rate to Exit Learning: 15%
- Hard SL: 6%
- Base Weights:
  - VCP 0.25, Momentum 0.25, Breakout 0.15, Flow 0.20
  - MeanRev 0.20 (raise in sideways)
  - Contrarian/Peak/Overbought/Profit‑Take: 0.10–0.20
- Leave other defaults as is, then fine‑tune by symbol/sector.
8) Reading the UI
- Table highlights: Real Trades, Win Rate, Avg Profit, Fake Actions/Win%, VCP Acc, Aggression, Equity, Score, Status (LEARNING/TRADING/REFLECTION), Last Real, Consec Loss, Best/Worst Trade, Pattern Score, Memory Source, Current Sector, AI Health, HTF Trend, Scheduler, Memory Loaded, Fake Active.
- Shapes: AI BUY (below bar), AI SELL/TAKE PROFIT (above bar)
- “AI Thoughts”: module contributions, context notes, debug lines
9) Troubleshooting
- No trades?
  - Ensure timeframe is 1D and the date filter covers the chart range
  - Check Scheduler Cooldown (3 bars default) and that barstate.isconfirmed (only at close)
  - If MTF is ON and HTF is bearish, buy bias is reduced; relax MTF Weight Adjustment or module weights
- Too many/too few trades?
  - Lower/raise Base Aggression Level
  - Adjust base weights on key modules (raise entry modules to be more active; raise exit/defense modules to be more selective)
- Learning doesn’t end?
  - Increase Min Fake Win Rate to Exit Learning only after it’s consistently stable; otherwise lower it or reduce Fake Trade Every N Bars
10) Important notes
- The strategy is non‑repainting at bar close by design (confirmed bars + HTF series  + close‑only alerts).
- Backtest fills may differ from live fills due to slippage and broker rules; this is normal for all TradingView strategies.
- Always validate settings across multiple symbols and regimes before going live.
If you want, I can bundle this guide into a README section in your Pine code and add a small on‑chart signature (Author/Producer: yuu_iu) in the top‑right corner.
Titan Investments|Quantitative THEMIS|Pro|BINANCE:BTCUSDTP:4hInvestment Strategy (Quantitative Trading)
| 🛑 | Watch "LIVE" and 'COPY' this strategy in real time:
          🔗 Link: www.tradingview.com
 
 Hello, welcome, feel free 🌹💐
 
Since the stone age to the most technological age, one thing has not changed, that which continues  impress   human  beings the most, is the  other   human  being!
 Deep down, it's all very simple or very complicated, depends on how you look at it. 
I believe that everyone was born to do something very well in life.
But few are those who have, let's use the word  'luck' .
Few are those who have the  'luck'  to discover this thing.
That is why few are happy and successful in their jobs and professions.
Thank God I had this  'luck' , and discovered what I was born to do well.
And I was born to program. 👨💻
📋 Summary :  Project Titan
0️⃣     : 🦄 Project Titan
1️⃣     : ⚖️ Quantitative THEMIS
2️⃣     : 🏛️ Titan Community
3️⃣     : 👨💻 Who am I ❔
4️⃣     : ❓ What is Statistical/Probabilistic Trading ❓
5️⃣     : ❓ How Statistical/Probabilistic Trading works ❓
6️⃣     : ❓ Why use a Statistical/Probabilistic system ❓
7️⃣     : ❓ Why the human brain is not prepared to do Trading ❓
8️⃣     : ❓ What is Backtest ❓
9️⃣     : ❓ How to build a Consistent system ❓
🔟     : ❓ What is a Quantitative Trading system ❓
1️⃣1️⃣ : ❓ How to build a Quantitative Trading system ❓
1️⃣2️⃣ : ❓ How to Exploit Market Anomalies ❓
1️⃣3️⃣ : ❓ What Defines a Robust, Profitable and Consistent System ❓
1️⃣4️⃣ : 🔧 Fixed Technical
1️⃣5️⃣ : ❌ Fixed Outputs : 🎯 TP(%) & 🛑SL(%)
1️⃣6️⃣ : ⚠️ Risk Profile
1️⃣7️⃣ : ⭕ Moving Exits : (Indicators)
1️⃣8️⃣ : 💸 Initial Capital
1️⃣9️⃣ : ⚙️ Entry Options
2️⃣0️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Third-Party Services'
2️⃣1️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Exchanges
2️⃣2️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Messaging Services'
2️⃣3️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : '🧲🤖Copy-Trading'
2️⃣4️⃣ : ❔ Why be a Titan Pro 👽❔
2️⃣5️⃣ : ❔ Why be a Titan Aff 🛸❔
2️⃣6️⃣ : 📋 Summary : ⚖️ Strategy: Titan Investments|Quantitative THEMIS|Pro|BINANCE:BTCUSDTP:4h
2️⃣7️⃣ : 📊 PERFORMANCE : 🆑 Conservative
2️⃣8️⃣ : 📊 PERFORMANCE : Ⓜ️ Moderate
2️⃣9️⃣ : 📊 PERFORMANCE : 🅰 Aggressive
3️⃣0️⃣ : 🛠️ Roadmap
3️⃣1️⃣ : 🧻 Notes ❕
3️⃣2️⃣ : 🚨 Disclaimer ❕❗
3️⃣3️⃣ : ♻️ ® No Repaint
3️⃣4️⃣ : 🔒 Copyright ©️
3️⃣5️⃣ : 👏 Acknowledgments
3️⃣6️⃣ : 👮 House Rules : 📺 TradingView
3️⃣7️⃣ : 🏛️ Become a Titan Pro member 👽
3️⃣8️⃣ : 🏛️ Be a member Titan Aff 🛸 
 0️⃣ : 🦄 Project Titan 
This is the  first  real, 100% automated  Quantitative   Strategy  made available to the public and the pinescript community for TradingView.
You will be able to  automate  all  signals  of this strategy for your  broker ,  centralized  or  decentralized  and also for  messaging   services : Discord, Telegram or Twitter .
This is the  first   strategy  of a larger project, in 2023, I will provide a total of 6 100% automated  'Quantitative'  strategies to the pinescript community for TradingView.
The future strategies to be shared here will also be  unique , never before seen, real  'Quantitative'  bots with real, validated results in real operation.
Just like the  'Quantitative THEMIS'  strategy, it will be something out of the loop throughout the pinescript/tradingview community, truly unique tools for building mutual wealth consistently and continuously for our community.
 1️⃣ : ⚖️ Quantitative THEMIS : Titan Investments|Quantitative THEMIS|Pro|BINANCE:BTCUSDTP:4h 
This is a truly unique and out of the curve strategy for  BTC /USD .
A truly real strategy, with real, validated results and in real operation.
A unique tool for building mutual wealth, consistently and continuously for the members of the Titan community.
Initially we will operate on a monthly, quarterly, annual or biennial subscription service.
Our goal here is to build a great community, in exchange for an extremely fair value for the use of our truly unique tools, which bring and will bring real results to our community members.
With this business model it will be possible to provide all Titan users and community members with the purest and highest degree of sophistication in the market with pinescript for tradingview, providing unique and truly profitable strategies.
My goal here is to offer the best to our members!
The best 'pinescript' tradingview service in the world!
We are the only Start-Up in the world that will decentralize real and full access to truly real 'quantitative' tools that bring and will bring real results for mutual and ongoing wealth building for our community.
 2️⃣ : 🏛️ Titan Community : 👽 Pro 🔁 Aff 🛸 
 Become a Titan Pro 👽 
To get access to the strategy:  "Quantitative THEMIS" , and future Titan strategies in a 100% automated way, along with all tutorials for automation.
 Pro Plans:  30 Days, 90 Days, 12 Months, 24 Months.
👽 Pro 🅼 Monthly
👽 Pro 🆀 Quarterly
👽 Pro🅰 Annual
👽 Pro👾Two Years
You will have access to a truly  unique  system that is  out   of   the   curve .
A 100% real, 100% automated, tested, validated, profitable, and in  real operation  strategy.
 Become a Titan Affiliate 🛸 
By becoming a Titan Affiliate 🛸, you will  automatically   receive   50%  of the value of each  new   subscription  you  refer .
You will  receive   50%  for any of the above  plans  that you  refer .
This way we will encourage our community to grow in a fair and healthy way, because we know what we have in our hands and what we deliver real value to our users.
We are at the highest level of sophistication in the market, the consistency here and the results here speak for themselves.
So growing our community means growing mutual wealth and raising collective conscience.
 Wealth must be created not divided. 
And here we are creating mutual wealth on all ends and in all ways.
A non-zero sum system, where everybody wins.
 3️⃣ : 👨💻 Who am I ❔ 
My name is  FilipeSoh  I am 26 years old, Technical Analyst, Trader, Computer Engineer, pinescript Specialist, with extensive experience in several languages and technologies.
For the last 4 years I have been focusing on developing, editing and creating pinescript indicators and strategies for Tradingview for people and myself.
Full-time passionate workaholic pinescript developer with over 10,000 hours of pinescript development.
• Pinescript expert ▬Tradingview.
• Specialist in Automated Trading
• Specialist in Quantitative Trading.
• Statistical/Probabilistic Trading Specialist - Mark Douglas Scholl.
• Inventor of the 'Classic Forecast' Indicators.
• Inventor of the 'Backtest Table'.
 4️⃣ : ❓ What is Statistical/Probabilistic Trading ❓ 
Statistical/probabilistic trading is the  only   way  to get a positive mathematical expectation regarding the market and consequently that is the  only   way  to make money consistently from it.
I will present below some more details about the  Quantitative THEMIS  strategy, it is a real strategy, tested, validated and in real operation,  'Skin in the Game' , a consistent way to make money with statistical/probabilistic trading in a 100% automated.
I am a  Technical Analyst , I used to be a  Discretionary Trader , today I am 100% a  Statistical Trader .
I've gotten rich and made a lot of money, and I've also lost a lot with 'leverage'.
That was a few years ago.
The book that changed everything for me was  "Trading in The Zone"  by Mark Douglas.
That's when I understood that the market is just a game of statistics and probability, like a casino!
It was then that I understood that the human brain is not prepared for trading, because it involves triggers and mental emotions.
And emotions in trading and in making trading decisions do not go well together, not in the long run, because you always have the burden of being wrong with the outcome of that particular position.
 But remembering that the market is just a statistical game! 
 5️⃣ : ❓ How Statistical/Probabilistic Trading works ❓ 
Let's use a  'coin'  as an example:
If we toss a  'coin'  up 10 times.
Do you agree that it is impossible for us to know exactly the result of the 'plays' before they actually happen?
As in the example above, would you agree, that we cannot  "guess"  the outcome of a position before it actually happens?
As much as we cannot  "guess"  whether the coin will drop  heads  or  tails  on each flip.
We can analyze the  "backtest"  of the 10 moves made with that coin:
If we analyze the 10 moves and count the number of times the coin fell heads or tails in a specific sequence, we then have a percentage of times the coin fell heads or tails, so we have a 'backtest' of those moves.
Then on the next flip we can now assume a point or a favorable  position  for one side,  the side with the highest probability .
In a nutshell, this is more or less how probabilistic statistical trading works.
As Statistical Traders we can never say whether such a Trader/Position we take will be a winner or a loser.
But still we can have a positive and consistent result in a  "sequence"  of trades, because before we even open a position, backtests have already been performed so we identify an anomaly and build a system that will have a positive statistical advantage in our favor over the market.
The advantage will not be in one trade itself, but in the  "sequence"  of trades as a whole!
Because our system will work like a casino, having a positive mathematical expectation relative to the players/market.
Design, develop, test models and systems that can take advantage of market anomalies, until they change.
 Be the casino! - Mark Douglas 
 6️⃣ : ❓ Why use a Statistical/Probabilistic system ❓ 
In recent years I have focused and specialized in developing 100% automated trading systems, essentially for the cryptocurrency market.
I have developed many extremely robust and efficient systems, with positive mathematical expectation towards the market.
These are  not   complex   systems   per   se , because here we want to avoid  'over-optimization'  as much as possible.
 As Da Vinci said: "Simplicity is the highest degree of sophistication". 
I say this because I have tested, tried and developed hundreds of systems/strategies.
I believe I have programmed more than 10,000 unique indicators/strategies, because this is my passion and purpose in life.
 I am passionate about what I do, completely! 
I love statistical trading because it is the only way to get consistency in the long run!
This is why I have studied, applied, developed, and specialized in 100% automated cryptocurrency trading systems.
The reason why our systems are extremely "simple" is because, as I mentioned before, in statistical trading we want to exploit the market anomaly to the maximum, that is, this anomaly will change from time to time, usually we can exploit a trading system efficiently for about 6 to 12 months, or for a few years, that is; for fixed 'scalpers' systems.
Because at some point these  anomalies  will be  identified , and from the moment they are  identified  they will be  exploited  and will stop being  anomalies .
With the system presented here; you can even  copy  the  indicators  and input  values  shared here;
However; what I have to offer you is: it  is me ,  our team , and  our community !
That is, we will  constantly   monitor  this system,  for life , because our goal here is to create a  unique ,  perpetual ,  profitable , and  consistent  system for our community.
 Myself ,  our team  and  our community  will keep this  script   periodically   updated , to ensure the  positive   mathematical   expectation  of it.
So we don't mind sharing the current  parameters  and  values , because the real value is also in the  future   updates  that this system will receive  from me  and  our team , guided by our culture and  our community  of  real users !
As we are  hosted  on 'tradingview', all future  updates  for this strategy, will be  implemented  and  updated   automatically  on your tradingview account.
What we want here is: to make sure  you get gains  from our system, because if  you get gains , our ecosystem will grow as a whole in a  healthy  and  scalable  way, so we will be  generating continuous mutual wealth and raising the collective consciousness .
 People Need People: 3️⃣🅿 
 7️⃣ : ❓ Why the human brain is not prepared to do Trading ❓ 
Today my greatest skill is to develop statistically profitable and 100% automated strategies for 'pinescript' tradingview.
Note that I said: 'profitable' because in fact statistical trading is the only way to make money in a 'consistent' way from the market.
And consequently have a positive wealth curve every cycle, because we will be based on mathematics, not on feelings and news.
Because the human brain is not prepared to do trading.
Because trading is connected to the decision making of the cerebral cortex.
And the decision making is automatically linked to emotions, and emotions don't match with trading decision making, because in those moments, we can feel the best and also the worst sensations and emotions, and this certainly affects us and makes us commit grotesque mistakes!
That's why the human brain is not prepared to do trading.
If you want to participate in a fully automated, profitable and consistent trading system; be a Titan Pro 👽
I believe we are walking an extremely enriching path here, not only in terms of financial returns for our community, but also in terms of knowledge about probabilistic and automated statistical trading.
You will have access to an extremely robust system, which was built upon very strong concepts and foundations, and upon the world's main asset in a few years: Bitcoin .
We are the tip of the best that exists in the cryptocurrency market when it comes to probabilistic and automated statistical trading.
 Result is result! Me being dressed or naked. 
 This is just the beginning! 
But there is a way to consistently make money from the market.
 Being the Casino! - Mark Douglas 
 8️⃣ : ❓ What is Backtest ❓ 
Imagine the market as a purely random system, but even in 'randomness' there are patterns.
So now imagine the market and statistical trading as follows:
Repeating the above 'coin' example, let's think of it as follows:
If we toss a coin up 10 times again.
It is impossible to know which flips will have heads or tails, correct?
But if we analyze these 10 tosses, then we will have a mathematical statistic of the past result, for example, 70 % of the tosses fell 'heads'.
That is:
7 moves fell on  "heads" .
3 moves fell on  "tails" .
So based on these conditions and on the generic backtest presented here, we could adopt " heads " as our system of moves, to have a statistical and probabilistic advantage in relation to the next move to be performed.
That is, if you define a system, based on  backtests , that has a robust positive mathematical expectation in relation to the market you will have a profitable system.
For every move you make you will have a positive statistical advantage in your favor over the market before you even make the move.
Like a casino in relation to all its players!
The casino does not have an advantage over one specific player, but over all players, because it has a positive mathematical expectation about all the moves that night.
The casino will always have a positive statistical advantage over its players.
Note that there will always be real players who will make real, million-dollar bankrolls that night, but this condition is already built into the casino's 'strategy', which has a pre-determined positive statistical advantage of that night as a whole.
 Statistical trading is the same thing, as long as you don't understand this you will keep losing money and consistently. 
 9️⃣ : ❓ How to build a Consistent system ❓ 
See most traders around the world perform trades believing that that specific position taken will make them filthy rich, because they simply believe faithfully that the position taken will be an undoubted winner, based on a trader's methodology: 'trading a trade' without analyzing the whole context, just using 'empirical' aspects in their system.
But if you think of trading, as a  sequence  of moves.
You see,  'a sequence' !
When we think statistically, it doesn't matter your  result  for  this , or for the  next  specific  trade , but the final  sequence  of trades as a whole.
As the market has a  random  system of  results   distribution , if your system has a positive statistical advantage in relation to the market, at the end of that  sequence  you'll have the biggest probability of having a  winning  bank.
 That's how you do real trading! 
 And with consistency! 
Trading is a long term game, but when you change the key you realize that it is a simple game to make money in a consistent way from the market, all you need is patience.
Even more when we are based on Bitcoin, which has its 'Halving' effect where, in theory, we will never lose money in 3 to 4 years intervals, due to its scarcity and the fact that Bitcoin is the 'discovery of digital scarcity' which makes it the digital gold, we believe in this thesis and we follow Satoshi's legacy.
So align Bitcoin with a probabilistic statistical trading system with a positive mathematical expectation of the market and 100% automated with the long term, and all you need is patience, and you will become rich.
In fact Bitcoin by itself is already a path, buy, wait for each halving and your wealth will be maintained.
No inflation, unlike fiat currencies.
This is a complete and extremely robust strategy, with the most current possible and 'not possible' techniques involved and applied here.
Today I am at another level in developing 100% automated 'quantitative' strategies.
 I was born for this! 
 🔟 : ❓ What is a Quantitative Trading system ❓ 
In addition to having access to a  revolutionary   strategy  you will have access to  disruptive  100% multifunctional  tables  with the ability to perform  'backtests'  for better tracking and monitoring of your system on a customized basis.
 I would like to emphasize one thing, and that is that you keep this in mind. 
Today my greatest skill in 'pinescript' is to build indicators, but mainly strategies, based on statistical and probabilistic trading, with a postive mathematical expectation in relation to the market, in a 100% automated way.
This with the goal of building a consistent and continuous positive equity curve through mathematics using data, converting it into statistical / probabilistic parameters and applying them to a Quantitative model.
Before becoming a  Quantitative Trader , I was a  Technical Analyst  and a  Discretionary Trader .
First as a position trader and then as a day trader.
Before becoming a Trader, I trained myself as a  Technical Analyst , to masterly understand the shape and workings of the market in theory.
But everything changed when I met  'Mark Douglas' , when I got to know his works, that's when my head exploded 🤯, and I started to understand the market for good!
The market is nothing more than a  'random'  system of distributing results.
See that I said:  'random' .
Do yourself a mental exercise.
Is there really such a thing as  random ?
I believe not, as far as we know maybe the 'singularity'.
So thinking this way, to translate, the market is nothing more than a game of probability, statistics and pure mathematics.
Like a casino!
What happens is that most traders, whenever they take a position, take it with all the empirical certainty that such position will win or lose, and do not take into consideration the total sequence of results to understand their place in the market.
Understanding your place in the market gives you the ability to create and design systems that can exploit the present market anomaly, and thus make money statistically, consistently, and 100% automated.
Thinking of it this way, it is easy to make money from the market.
There are many ways to make money from the market, but the only consistent way I know of is through 'probabilistic and automated statistical trading'.
 1️⃣1️⃣ : ❓ How to build a Quantitative Trading system ❓ 
There are some fundamental points that must be addressed here in order to understand what makes up a system based on statistics and probability applied to a quantitative model.
When we talk about 'discretionary' trading, it is a trading system based on  human   decisions  after the defined 'empirical' conditions are met.
It is quite another thing to build a  fully   automated   system  without any  human interference/interaction .
That said:
Building a statistically profitable system is perfectly possible,  but this is a high level task , but with possible high rewards and consistent gains.
Here you will find a real  "Skin In The Game"  strategy.
With all due respect, but the vast majority of traders who post  strategies  on TradingView do not understand what they are doing.
Most of them do not understand the minimum complexity involved in the main variable for the construction of a real strategy, the mother variable: "strategy".
I say this by my own experience, because I have analyzed practically all the existing publications of TradingView + 200,000 indicators and strategies.
I breathe pinescript, I eat pinescript, I sleep pinescript, I bathe pinescript, I live TradingView.
But the main advantage for the TradingView users, is that all entry and exit orders made by this strategy can be checked and analyzed thoroughly, to validate and prove the veracity of this strategy, because this is a 100% real strategy.
Here there is a huge world of possibilities, but only one way to build a  'pinescript strategy'  that will work correctly aligned to the real world with  real results .
There are some  fundamental   points  to take into consideration when  building  a profitable trading system:
The most important of these for me is:  'DrawDown' .
Followed by:  'Hit Rate' .
And only after that we use the parameter: 'Profit'.
See, this is because here, we are dealing with the  'imponderable' , and anything can happen in this scenario.
But there is one thing that makes us sleep peacefully at night, and that is:  controlling losses .
That is, in other words:  controlling  the  DrawDown .
The amateur is concerned with 'winning', the professional is concerned with conserving capital.
If we have the losses under control, then we can move on to the other two parameters: hit rate and profit.
See, the second most important factor in building a system is the hit rate.
I say this from my own experience.
I have worked with many systems with a 'low hit rate', but extremely profitable.
For example: systems with hit rates of 40 to 50%.
But as much as statistically and mathematically the profit is rewarding, operating systems with a low hit rate is always very stressful psychologically.
That's why there are two big reasons why when I build an automated trading system, I focus on the high hit rate of the system, they are
1 -  To reduce psychological damage as much as possible .
2 -  And more important , when we create a system with a  'high hit rate' , there is a huge intrinsic advantage here, that most statistic traders don't take in consideration.
 That is: knowing more quickly when the system stops being functional. 
The main  advantage  of a system with a  high hit rate  is: to identify when the system stops being functional and stop exploiting the market's anomaly.
Look: When we are talking about trading and random distribution of results on the market, do you agree that when we create a trading system, we are focused on exploring some  anomaly  of that market?
When that anomaly is verified by the market, it will stop being functional with time.
That's why trading systems, 'scalpers', especially for cryptocurrencies, need constant monitoring, quarterly, semi-annually or annually.
Because market movements change from time to time.
Because we go through different cycles from time to time, such as congestion cycles,  accumulation ,  distribution ,  volatility ,  uptrends  and  downtrends .
 1️⃣2️⃣ : ❓ How to Exploit Market Anomalies ❓ 
 You see there is a very important point that must be stressed here. 
As we are always trying to exploit an  'anomaly'  in the market.
So the 'number' of indicators/tools that will integrate the system is of paramount importance.
But most traders do not take this into consideration.
To build a professional, robust, consistent, and profitable system, you don't need to use hundreds of indicators to build your setup.
This will actually make it harder to read when the setup stops working and needs some adjustment.
So focusing on a  high hit rate   is very important  here,  this is a fundamental principle that is widely ignored , and with a high hit rate, we can know much more accurately when the system is no longer functional much faster.
 As Darwin said: "It is not the strongest or the most intelligent that wins the game of life, it is the most adapted. 
So simple systems, as contradictory as it may seem, are more efficient, because they help to identify inflection points in the market much more quickly.
 1️⃣3️⃣ : ❓ What Defines a Robust, Profitable and Consistent System ❓ 
See I have built, hundreds of thousands of indicators and 'pinescript' strategies, hundreds of thousands.
This is an extremely professional, robust and profitable system.
Based on the currency pairs: BTC /USDT
There are many ways and avenues to build a profitable trading setup/system.
And actually this is not a difficult task, taking in consideration, as the main factor here, that our trading and investment plan is for the long term, so consequently we will face scenarios with less noise.
He who is in a hurry eats raw.
As mentioned before.
Defining trends in pinescript is technically a simple task, the hardest task is to determine congestion zones with low volume and volatility, it's in these moments that many false signals are generated, and consequently is where most setups face their maximum DrawDown.
That's why this strategy was strictly and thoroughly planned, built on a very solid foundation, to avoid as much noise as possible, for a positive and consistent equity curve in each market cycle, 'Consistency' is our 'Mantra' around here.
 1️⃣4️⃣ : 🔧 Fixed Technical 
 • Strategy:      Titan Investments|Quantitative THEMIS|Pro|BINANCE:BTCUSDTP:4h
• Pair:             BTC/USDTP
• Time Frame: 4 hours
• Broker:         Binance (Recommended) 
For a more conservative scenario, we have built the Quantitative THEMIS for the 4h time frame, with the main focus on consistency.
So we can avoid noise as much as possible!
 1️⃣5️⃣ : ❌ Fixed Outputs : 🎯 TP(%) & 🛑SL(%) 
In order to build a 'perpetual' system specific to BTC/USDT, it took a lot of testing, and more testing, and a lot of investment and research.
There is one initial and fundamental point that we can address to justify the incredible consistency presented here.
 That fundamental point is our exit via Take Profit or Stop Loss percentage (%). 
 🎯 Take Profit (%) 
 🛑 Stop Loss (%) 
See, today I have been testing some more  advanced backtesting models  for some cryptocurrency systems.
In which I perform 'backtest of backtest', i.e. we use a set of strategies each focused on a principle, operating individually, but they are part of something unique, i.e. we do 'backtests' of 'backtests' together.
What I mean is that we do a lot of backtesting around here.
I can assure you, that always the best output for a trading system is to set fixed output values!
In other words:
 🎯 Take Profit (%) 
 🛑 Stop Loss (%) 
This happens because statistically setting fixed exit structures in the vast majority of times, presents a superior result on the capital/equity curve, throughout history and for the vast majority of setups compared to other exit methods.
This is due to a mathematical principle of simplicity, 'avoiding more noise'.
 Thus whenever the Quantitative THEMIS strategy takes a position it has a target and a defined maximum stop percentage. 
 1️⃣6️⃣ : ⚠️ Risk Profile 
The strategy, currently has  3 risk profiles  ⚠️ patterns for 'fixed percentage exits':  Take Profit (%)  and  Stop Loss (%) .
 They are: ⚠️ Rich's Profiles 
✔️🆑 Conservative: 🎯 TP=2.7 % 🛑 SL=2.7 %
❌Ⓜ️ Moderate:     🎯 TP=2.8 % 🛑 SL=2.7 %
❌🅰 Aggressive:    🎯 TP=1.6 % 🛑 SL=6.9 %
You will be able to select and switch between the above options and profiles through the 'input' menu of the strategy by navigating to the "⚠️ Risk Profile" menu.
You can then  select, test and apply the Risk Profile above  that best suits your  risk management, expectations and reality , as well as customize all the 'fixed exit' values through the TP and SL menus below.
 1️⃣7️⃣ : ⭕ Moving Exits : (Indicators) 
The strategy currently also has  'Moving Exits'  based on indicator signals.
 These are Moving Exits (Indicators) 
📈 LONG : (EXIT)
🧃 (MAO) Short : true
📉 SHORT : (EXIT)
🧃 (MAO) Long: false
You can select and toggle between the above options through the 'input' menu of the strategy by navigating to the "LONG : Exit" and "SHORT : Exit" menu.
 1️⃣8️⃣ : 💸 Initial Capital 
By default the  "Initial Capital"  set for  entries  and  backtests  of this strategy is:  10000 $ 
You can set another value for the 'Starting Capital' through the tradingview menu under  "properties" , and edit the value of the  "Initial Capital"  field.
This way you can set and test other 'Entry Values' for your trades, tests and backtests.
 1️⃣9️⃣ : ⚙️ Entry Options 
By default the 'order size' set for this strategy is 100 % of the 'initial capital' on each new trade.
You can set and test other  entry options like :  contracts ,  cash ,  % of equity 
You should make these changes directly in the input menu of the strategy by navigating to the menu  "⚙️ Properties : TradingView"  below.
⚙️ Properties : (TradingView)
📊 Strategy Type:   strategy.position_size != 1
📝💲 % Order Type: % of equity
📝💲 % Order Size: 100
Leverage:             1
So you can define and test other 'Entry Options' for your trades, tests and backtests.
 2️⃣0️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Third-Party Services' 
 
 It is possible to automate the signals of this strategy for any centralized or decentralized broker, as well as for messaging services: Discord, Telegram and Twitter. 
All in an extremely simple and uncomplicated way through the tutorials available in PDF /VIDEO for our Titan Pro 👽 subscriber community.
With our tutorials in PDF and Video it will be possible to automate the signals of this strategy for the chosen service in an extremely simple way with less than 10 steps only.
Tradingview naturally doesn't count with native integration between brokers and tradingview.
But it is possible to use 'third party services' to do the integration and automation between Tradingview and your centralized or decentralized broker.
Here are the standard, available and recommended 'third party services' to automate the signals from the 'Quantitative THEMIS' strategy on the tradingview for your broker:
1) Wundertrading (Recommended): 
2) 3commas:                               
3) Zignaly:                                  
4) Aleeert.com    (Recommended): 
5) Alertatron:                              
Note! 'Third party services' cannot perform 'withdrawals' via their key 'API', they can only open positions, so your funds will always be 'safe' in your brokerage firm, being traded via the 'API', when they receive an entry and exit signal from this strategy.
 2️⃣1️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Exchanges 
You can automate this strategy for any of the brokers below, through your broker's 'API' by connecting it to the 'third party automation services' for tradingview available and mentioned in the menu above:
1) Binance (Recommended)
2) Bitmex
3) Bybit
4) KuCoin
5) Deribit
6) OKX
7) Coinbase
8) Huobi
9) Bitfinex
10) Bitget
11) Bittrex
12) Bitstamp
13) Gate. io
14) Kraken
15) Gemini
16) Ascendex
17) VCCE
 2️⃣2️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Messaging Services' 
You can also automate and monitor the signals of this strategy much more efficiently by sending them to the following popular messaging services:
1) Discord
2) Telegram
3) Twitter
 2️⃣3️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : '🧲🤖Copy-Trading' 
It will also be possible to copy/replicate the entries and exits of this strategy to your broker in an extremely simple and agile way, through the available copy-trader services.
This way it will be possible to replicate the signals of this strategy at each entry and exit to your broker through the API connecting it to the integrated copy-trader services available through the tradingview automation services below:
1) Wundetrading: 
2) Zignaly:          
 2️⃣4️⃣ : ❔ Why be a Titan Pro 👽❔ 
I believe that today I am at another level in 'pinescript' development.
I consider myself today a true unicorn as a pinescript developer, someone unique and very rare.
If you choose another tool or another pinescript service, this tool will be just another one, with no real results.
But if you join our Titan community, you will have access to a unique tool! And you will get real results!
I already earn money consistently with statistical and automated trading and as an expert pinescript developer.
I am here to evolve my skills as much as possible, and one day become a pinescript 'Wizard'.
So excellence, quality and professionalism will always be my north here.
You will never find a developer like me, and who will take so seriously such a revolutionary project as this one. A Maverick! ▬ The man never stops!
Here you will find the highest degree of sophistication and development in the market for 'pinescript'.
You will get the best of me and the best of pinescript possible.
Let me show you how a professional in my field does it.
Become a Titan Pro Member 👽 and get Full Access to this strategy and all the Automation Tutorials.
 Be the Titan in your life! 
 2️⃣5️⃣ : ❔ Why be a Titan Aff 🛸❔ 
Get financial return for your referrals, Decentralize the World, and raise the collective consciousness.
 2️⃣6️⃣ : 📋 Summary : ⚖️ Strategy: Titan Investments|Quantitative THEMIS|Pro|BINANCE:BTCUSDTP:4h 
® Titan Investimentos | Quantitative THEMIS ⚖️ | Pro 👽 2.6 | Dev: © FilipeSoh 🧙 | 🤖 100% Automated : Discord, Telegram, Twitter, Wundertrading, 3commas, Zignaly, Aleeert, Alertatron, Uniswap-v3 | BINANCE:BTCUSDTPERP 4h
🛒 Subscribe this strategy  ❗️  Be a Titan Member 🏛️
🛒 Titan Pro        👽   🏛️ Titan Pro        👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO)
🛒 Titan Affiliate 🛸  🏛️ Titan Affiliate 🛸 (Subscription Sale) 🔥 Receive 50% commission
📋 Summary : QT THEMIS ⚖️
🕵️♂️ Check This Strategy..................................................................0
🦄 ® Titan Investimentos...............................................................1
👨💻 © Developer..........................................................................2
📚 Signal Automation Tutorials : (PDF/VIDEO).......................................3
👨🔧 Revision...............................................................................4
📊 Table : (BACKTEST)..................................................................5
📊 Table : (INFORMATIONS).............................................................6
⚙️ Properties : (TRADINGVIEW)........................................................7
📆 Backtest : (TRADINGVIEW)..........................................................8
⚠️ Risk Profile...........................................................................9
🟢 On 🔴 Off : (LONG/SHORT).......................................................10
📈 LONG : (ENTRY)....................................................................11
📉 SHORT : (ENTRY)...................................................................12
📈 LONG : (EXIT).......................................................................13
📉 SHORT : (EXIT)......................................................................14
🧩 (EI) External Indicator.............................................................15
📡 (QT) Quantitative...................................................................16
🎠 (FF) Forecast......................................................................17
🅱 (BB) Bollinger Bands................................................................18
🧃 (MAP) Moving Average Primary......................................................19
🧃 (MAP) Labels.........................................................................20
🍔 (MAQ) Moving Average Quaternary.................................................21
🍟 (MACD) Moving Average Convergence Divergence...............................22
📣 (VWAP) Volume Weighted Average Price........................................23
🪀 (HL) HILO..........................................................................24
🅾 (OBV) On Balance Volume.........................................................25
🥊 (SAR) Stop and Reverse...........................................................26
🛡️ (DSR) Dynamic Support and Resistance..........................................27
🔊 (VD) Volume Directional..........................................................28
🧰 (RSI) Relative Momentum Index.................................................29
🎯 (TP) Take Profit %..................................................................30
🛑 (SL) Stop Loss %....................................................................31
🤖 Automation Selected...............................................................32
📱💻 Discord............................................................................33
📱💻 Telegram..........................................................................34
📱💻 Twitter...........................................................................35
🤖 Wundertrading......................................................................36
🤖 3commas............................................................................37
🤖 Zignaly...............................................................................38
🤖 Aleeert...............................................................................39
🤖 Alertatron...........................................................................40
🤖 Uniswap-v3..........................................................................41
🧲🤖 Copy-Trading....................................................................42
♻️ ® No Repaint........................................................................43
🔒 Copyright ©️..........................................................................44
🏛️ Be a Titan Member..................................................................45
Nº Active Users..........................................................................46
⏱ Time Left............................................................................47
| 0 | 🕵️♂️ Check This Strategy
        🕵️♂️ Version Demo: 🐄 Version with ❌non-integrated automation 🤖 and 📚 Tutorials for automation ❌not available 
        🕵️♂️ Version Pro: 👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO) 
| 1 | 🦄 ® Titan Investimentos
        Decentralizing the World 🗺
        Raising the Collective Conscience 🗺
       
        🦄Site:             
        🦄TradingView: www.tradingview.com
        🦄Discord:        
        🦄Telegram:     
        🦄Youtube:       
        🦄Twitter:        
        🦄Instagram:    
        🦄TikTok:        
        🦄Linkedin:      
        🦄E-mail:         
| 2 | 👨💻 © Developer
        🧠 Developer:    @FilipeSoh🧙
        📺 TradingView: www.tradingview.com
        ☑️ Linkedin:      
        ✅ Fiverr:         
        ✅ Upwork:       
        🎥 YouTube:      
        🐤 Twitter:       
        🤳 Instagram:   
| 3 | 📚 Signal Automation Tutorials : (PDF/VIDEO)
        📚 Discord:           🔗 Link: 🔒Titan Pro👽
        📚 Telegram:        🔗 Link: 🔒Titan Pro👽
        📚 Twitter:           🔗 Link: 🔒Titan Pro👽
        📚 Wundertrading: 🔗 Link: 🔒Titan Pro👽
        📚 3comnas:         🔗 Link: 🔒Titan Pro👽
        📚 Zignaly:           🔗 Link: 🔒Titan Pro👽
        📚 Aleeert:           🔗 Link: 🔒Titan Pro👽
        📚 Alertatron:       🔗 Link: 🔒Titan Pro👽
        📚 Uniswap-v3:     🔗 Link: 🔒Titan Pro👽
        📚 Copy-Trading:   🔗 Link: 🔒Titan Pro👽
| 4 | 👨🔧 Revision
        👨🔧 Start Of Operations: 01 Jan 2019 21:00 -0300 💡 Start Of Operations (Skin in the game) : Revision 1.0
        👨🔧 Previous Review:      01 Jan 2022 21:00 -0300 💡 Previous Review : Revision 2.0
        👨🔧 Current Revision:     01 Jan 2023 21:00 -0300 💡 Current Revision : Revision 2.6
        👨🔧 Next Revision:         28 May 2023 21:00 -0300 💡 Next Revision : Revision 2.7
| 5 | 📊 Table : (BACKTEST)
        📊 Table: true
        🖌️ Style:  label.style_label_left
        📐 Size:   size_small
        📏 Line:  defval
        🎨 Color: #131722
| 6 | 📊 Table : (INFORMATIONS)
        📊 Table: false
        🖌️ Style:  label.style_label_right
        📐 Size:   size_small
        📏 Line:  defval
        🎨 Color: #131722
| 7 | ⚙️ Properties : (TradingView)
        📊 Strategy Type:  strategy.position_size != 1
        📝💲 %  Order Type: % of equity
        📝💲 %  Order Size: 100 %
        🚀 Leverage:        1
| 8 | 📆 Backtest : (TradingView)
         
        🗓️ Mon:     true
        🗓️ Tue:      true
        🗓️ Wed:     true
        🗓️ Thu:      true
        🗓️ Fri:       true
        🗓️ Sat:       true
        🗓️ Sun:      true
        📆 Range:  custom
        📆 Start:    UTC 31 Oct 2008 00:00
        📆 End:      UTC 31 Oct 2030 23:45
        📆 Session: 0000-0000
        📆 UTC:     UTC
| 9 | ⚠️ Risk Profile
        ✔️🆑 Conservative: 🎯 TP=2.7 %  🛑 SL=2.7 %
        ❌Ⓜ️ Moderate:     🎯 TP=2.8 %  🛑 SL=2.7 %
        ❌🅰 Aggressive:    🎯 TP=1.6 %  🛑 SL=6.9 %
| 10 | 🟢 On 🔴 Off : (LONG/SHORT)
         🟢📈 LONG:  true
         🟢📉 SHORT: true
| 11 | 📈 LONG : (ENTRY)
         📡 (QT) Long:       true
         🧃 (MAP) Long:      false
         🅱 (BB) Long:       false
         🍟 (MACD) Long: false
         🅾 (OBV) Long:     false
| 12 | 📉 SHORT : (ENTRY)
         📡 (QT) Short:       true
         🧃 (MAP) Short:      false
         🅱 (BB) Short:       false
         🍟 (MACD) Short: false
         🅾 (OBV) Short:     false
| 13 | 📈 LONG : (EXIT)
         🧃 (MAP) Short: true
| 14 | 📉 SHORT : (EXIT)
         🧃 (MAP) Long: false
| 15 | 🧩 (EI) External Indicator
         🧩 (EI) Connect your external indicator/filter:              false
         🧩 (EI)   Connect your indicator here (Study mode only): close
         🧩 (EI)   Connect your indicator here (Study mode only): close
| 16 | 📡 (QT) Quantitative
         📡 (QT) Quantitative: true
         📡 (QT) Market:        BINANCE:BTCUSDTPERP
         📡 (QT) Dice:            openai
| 17 | 🎠 (FF) Forecast
         🎠 (FF) Include current unclosed current candle:  true
         🎠 (FF) Forecast Type:                                    flat
         🎠 (FF) Nº of candles to use in linear regression: 3
| 18 | 🅱 (BB) Bollinger Bands
         🅱 (BB) Bollinger Bands: true
         🅱 (BB) Type:               EMA
         🅱 (BB) Period:             20
         🅱 (BB) Source:            close
         🅱 (BB) Multiplier:         2
         🅱 (BB) Linewidth:        0
         🅱 (BB) Color:              #131722
| 19 | 🧃 (MAP) Moving Average Primary
         🧃 (MAP) Moving Average Primary: true
         🧃 (MAP) BarColor:                      false
         🧃 (MAP) Background:                  false
         🧃 (MAP) Type:                           SMA
         🧃 (MAP) Source:                        open
         🧃 (MAP) Period:                         100
         🧃 (MAP) Multiplier:                     2.0
         🧃 (MAP) Linewidth:                    2
         🧃 (MAP) Color P:                        #42bda8
         🧃 (MAP) Color N:                       #801922
| 20 | 🧃 (MAP) Labels
         🧃 (MAP) Labels:               true
         🧃 (MAP) Style BUY ZONE:  shape.labelup
         🧃 (MAP) Color BUY ZONE: #42bda8
         🧃 (MAP) Style SELL ZONE: shape.labeldown
         🧃 (MAP) Color SELL ZONE: #801922
| 21 | 🍔 (MAQ) Moving Average Quaternary
         🍔 (MAQ) Moving Average Quaternary: true
         🍔 (MAQ) BarColor:                          false
         🍔 (MAQ) Background:                      false
         🍔 (MAQ) Type:                                SMA
         🍔 (MAQ) Source:                              close
         🍔 (MAQ) Primary:                           14
         🍔 (MAQ) Secondary:                        22
         🍔 (MAQ) Tertiary:                           44
         🍔 (MAQ) Quaternary:                      16
         🍔 (MAQ) Linewidth:                          0
         🍔 (MAQ) Color P:                            #42bda8
         🍔 (MAQ) Color N:                            #801922
| 22 | 🍟 (MACD) Moving Average Convergence Divergence
         🍟 (MACD) Macd Type:  EMA
         🍟 (MACD) Signal Type: EMA
         🍟 (MACD) Source:       close
         🍟 (MACD) Fast:          12
         🍟 (MACD) Slow:          26
         🍟 (MACD) Smoothing:  9
| 23 | 📣 (VWAP) Volume Weighted Average Price
         📣 (VWAP) Source:             close
         📣 (VWAP) Period:              340
         📣 (VWAP) Momentum A:     84
         📣 (VWAP) Momentum B:    150
         📣 (VWAP) Average Volume: 1
         📣 (VWAP) Multiplier:          1
         📣 (VWAP) Diviser:             2
| 24 | 🪀 (HL) HILO
         🪀 (HL) Type:          SMA
         🪀 (HL) Function:     Maverick🧙
         🪀 (HL) Source H:    high
         🪀 (HL) Source L:     low
         🪀 (HL) Period:        20
         🪀 (HL) Momentum: 26
         🪀 (HL) Diviser:        2
         🪀 (HL) Multiplier:    1
| 25 | 🅾 (OBV) On Balance Volume
         🅾 (OBV) Type:        EMA
         🅾 (OBV) Source:     close
         🅾 (OBV) Period:     16
         🅾 (OBV) Diviser:     2
         🅾 (OBV) Multiplier: 1
| 26 | 🥊 (SAR) Stop and Reverse
         🥊 (SAR) Source:     close
         🥊 (SAR) High:        1.8
         🥊 (SAR) Mid:         1.6
         🥊 (SAR) Low:        1.6
         🥊 (SAR) Diviser:     2
         🥊 (SAR) Multiplier: 1
| 27 | 🛡️ (DSR) Dynamic Support and Resistance
         🛡️ (DSR) Source D:       close
         🛡️ (DSR) Source R:       high
         🛡️ (DSR) Source S:       low
         🛡️ (DSR) Momentum R: 0
         🛡️ (DSR) Momentum S: 2
         🛡️ (DSR) Diviser:          2
         🛡️ (DSR) Multiplier:      1
| 28 | 🔊 (VD) Volume Directional
         🔊 (VD) Type:          SMA
         🔊 (VD) Period:        68
         🔊 (VD) Momentum: 3.8
         🔊 (VD) Diviser:       2
         🔊 (VD) Multiplier:    1
| 29 | 🧰 (RSI) Relative Momentum Index
         🧰 (RSI) Type UP:        EMA
         🧰 (RSI) Type DOWN:   EMA
         🧰 (RSI) Source:          close
         🧰 (RSI) Period:           29
         🧰 (RSI) Smoothing:     22
         🧰 (RSI) Momentum R: 64
         🧰 (RSI) Momentum S: 142
         🧰 (RSI) Diviser:          2
         🧰 (RSI) Multiplier:      1
| 30 | 🎯 (TP) Take Profit %
         🎯 (TP) Take Profit: false
         🎯 (TP) %:              2.2
         🎯 (TP) Color:         #42bda8
         🎯 (TP) Linewidth:  1
| 31 | 🛑 (SL) Stop Loss %
         🛑 (SL) Stop Loss:  false
         🛑 (SL) %:             2.7
         🛑 (SL) Color:        #801922
         🛑 (SL) Linewidth: 1
| 32 | 🤖 Automation : Discord | Telegram | Twitter | Wundertrading | 3commas | Zignaly | Aleeert | Alertatron | Uniswap-v3
         🤖 Automation Selected : Discord
| 33 | 🤖 Discord
         🔗 Link Discord:            discord.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Discord ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Discord ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Discord ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Discord ▬ Exit Short:   🔒Titan Pro👽
| 34 | 🤖 Telegram
         🔗 Link Telegram:          telegram.org
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Telegram ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Telegram ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Telegram ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Telegram ▬ Exit Short:   🔒Titan Pro👽
| 35 | 🤖 Twitter
         🔗 Link Twitter:            twitter.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Twitter ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Twitter ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Twitter ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Twitter ▬ Exit Short:   🔒Titan Pro👽
| 36 | 🤖 Wundertrading : Binance | Bitmex | Bybit | KuCoin | Deribit | OKX | Coinbase | Huobi | Bitfinex | Bitget
         🔗 Link Wundertrading:  wundertrading.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Wundertrading ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Wundertrading ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Wundertrading ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Wundertrading ▬ Exit Short:   🔒Titan Pro👽
| 37 | 🤖 3commas : Binance | Bybit | OKX | Bitfinex | Coinbase | Deribit | Bitmex | Bittrex | Bitstamp | Gate.io | Kraken | Gemini | Huobi | KuCoin
         🔗 Link 3commas:          3commas.io
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 3commas ▬ Enter Long:  🔒Titan Pro👽
         📱💻 3commas ▬ Exit Long:    🔒Titan Pro👽
         📱💻 3commas ▬ Enter Short: 🔒Titan Pro👽
         📱💻 3commas ▬ Exit Short:   🔒Titan Pro👽
| 38 | 🤖 Zignaly : Binance | Ascendex | Bitmex | Kucoin | VCCE
         🔗 Link Zignaly:             zignaly.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         🤖 Type Automation:        Profit Sharing
         🤖 Type Provider:             Webook
         🔑 Key:                         🔒Titan Pro👽
         🤖 pair:                         BTCUSDTP
         🤖 exchange:                  binance
         🤖 exchangeAccountType: futures
         🤖 orderType:                 market
         🚀 leverage:                   1x
          % positionSizePercentage: 100 %
         💸 positionSizeQuote:       10000 $
         🆔 signalId:                     @Signal1234
| 39 | 🤖 Aleeert : Binance
         🔗 Link Aleeert:             aleeert.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Aleeert ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Aleeert ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Aleeert ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Aleeert ▬ Exit Short:   🔒Titan Pro👽
| 40 | 🤖 Alertatron : Binance | Bybit | Deribit | Bitmex
         🔗 Link Alertatron:         alertatron.com
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Alertatron ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Alertatron ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Alertatron ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Alertatron ▬ Exit Short:   🔒Titan Pro👽
| 41 | 🤖 Uniswap-v3
         🔗 Link Alertatron:         uniswap.org
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Exit Short:   🔒Titan Pro👽
| 42 | 🧲🤖 Copy-Trading : Zignaly | Wundertrading
         🔗 Link 📚 Copy-Trading:                  🔒Titan Pro👽
         🧲🤖 Copy-Trading ▬ Zignaly:           🔒Titan Pro👽
         🧲🤖 Copy-Trading ▬ Wundertrading: 🔒Titan Pro👽
| 43 | ♻️ ® Don't Repaint!
         ♻️ This Strategy does not Repaint!:                  ® Signs Do not repaint❕
         ♻️ This is a Real Strategy!:                              Quality : ® Titan Investimentos
         📋️️ Get more information about Repainting here: 
| 44 | 🔒 Copyright ©️
         🔒 Copyright ©️: Copyright © 2023-2024 All rights reserved, ® Titan Investimentos
         🔒 Copyright ©️: ® Titan Investimentos
         🔒 Copyright ©️: Unique and Exclusive Strategy. All rights reserved
| 45 | 🏛️ Be a Titan Members
         🏛️ Titan Pro        👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO) 
         🏛️ Titan Affiliate 🛸 (Subscription Sale) 🔥 Receive 50% commission                                                                                            
| 46 | ⏱ Time Left
         Time Left Titan Demo 🐄: ⏱♾            | ⏱ : ♾ Titan Demo 🐄 Version with ❌non-integrated automation 🤖 and 📚 Tutorials for automation ❌not available
         Time Left Titan Pro     👽: 🔒Titan Pro👽 | ⏱ : Pro Plans: 30 Days, 90 Days, 12 Months, 24 Months. (👽 Pro 🅼 Monthly, 👽 Pro 🆀 Quarterly, 👽 Pro🅰 Annual, 👽 Pro👾Two Years)
| 47 | Nº Active Users
 
         Nº Active Subscribers Titan Pro 👽: 5️⃣6️⃣ | 1✔️ 5✔️ 10✔️ 100❌ 1K❌ 10K❌ 50K❌ 100K❌ 1M❌ 10M❌ 100M❌ : ⏱ Active Users is updated every 24 hours (Check on indicator)
         Nº Active Affiliates    Titan Aff 🛸: 6️⃣     | 1✔️ 5✔️ 10❌ 100❌ 1K❌ 10K❌  50K❌ 100K❌ 1M❌ 10M❌ 100M❌ : ⏱ Active Users is updated every 24 hours (Check on indicator)
2️⃣7️⃣ : 📊  PERFORMANCE : 🆑 Conservative 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: 🆑 Conservative: 🎯 TP=2.7 % | 🛑 SL=2.7 %
• 📆All years: 🆑 Conservative: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit:
🟢 + 1669.89 %
💲   + 166989.43 USD
Total Close Trades:
⚪️ 369
Percent  Profitable:
🟡 64.77 %
Profit Factor:
🟢 2.314
DrawDrown Maximum:
🔴 -24.82 %
💲   -10221.43 USD
Avg Trade:
💲   + 452.55 USD
✔️ Trades Winning: 239
❌ Trades Losing:   130
                                                                  
✔️ Average Gross Win: + 12.31 %
❌ Average Gross Loss: - 9.78 %
                                                                                                        
✔️ Maximum Consecutive Wins:   9
❌ Maximum Consecutive Losses: 6
%  Average Gain Annual:   499.33 %
%  Average Gain Monthly: 41.61 %
%  Average Gain Weekly:  9.6 %
%  Average Gain Day:      1.37 %
💲  Average Gain Annual:   49933 $
💲  Average Gain Monthly: 4161 $
💲  Average Gain Weekly:  960 $
💲  Average Gain Day:      137 $ 
                                                              
• 📆 Year: 2020: 🆑 Conservative: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: 🆑 Conservative: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: 🆑 Conservative: 🚀 Leverage 1️⃣x
2️⃣8️⃣ : 📊  PERFORMANCE : Ⓜ️ Moderate 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: Ⓜ️ Moderate: 🎯 TP=2.8 % | 🛑 SL=2.7 %
• 📆 All years: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit: 
🟢 + 1472.04 %
💲   + 147199.89 USD
Total Close Trades:
⚪️ 362
Percent  Profitable:
🟡 63.26 %
Profit Factor:
🟢 2.192
DrawDrown Maximum:
🔴 -22.69 %
💲   -9269.33 USD
Avg Trade:
💲   + 406.63 USD
                                                                                                     
✔️ Trades Winning: 229
❌ Trades Losing   : 133
                                                                  
✔️ Average Gross Win: + 11.82 %
❌ Average Gross Loss: - 9.29 %
                                                                                                        
✔️ Maximum Consecutive Wins:   9
❌ Maximum Consecutive Losses: 8
%  Average Gain Annual:  440.15 %
%  Average Gain Monthly: 36.68 %
%  Average Gain Weekly:  8.46 %
%  Average Gain Day:      1.21 %
💲  Average Gain Annual:  44015 $
💲  Average Gain Monthly: 3668 $
💲  Average Gain Weekly:  846 $
💲  Average Gain Day:      121 $
                                    
                          
• 📆 Year: 2020: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
2️⃣9️⃣ : 📊  PERFORMANCE : 🅰 Aggressive 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: 🅰 Aggressive: 🎯 TP=1.6 % | 🛑 SL=6.9 %
• 📆 All years: 🅰 Aggressive: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit:
🟢 + 989.38 %
💲   + 98938.38 USD
Total Close Trades:
⚪️ 380
Percent  Profitable:
🟢 84.47 %
Profit Factor:
🟢 2.156
DrawDrown Maximum:
🔴 -17.88 %
💲   -9182.84 USD
Avg Trade:
💲   + 260.36 USD
                                                                                                                 
✔️ Trades Winning: 321
❌ Trades Losing:   59
                                                                  
✔️ Average Gross Win: + 5.75 %
❌ Average Gross Loss: - 14.51 %
                                                                                                        
✔️ Maximum Consecutive Wins:   21
❌ Maximum Consecutive Losses: 6
%  Average Gain Annual:  295.84 %
%  Average Gain Monthly: 24.65 %
%  Average Gain Weekly:  5.69 %
%  Average Gain Day:      0.81 %
💲  Average Gain Annual:  29584 $
💲  Average Gain Monthly: 2465 $
💲  Average Gain Weekly:  569 $
💲  Average Gain Day:      81 $
• 📆 Year: 2020: 🅰 Aggressive: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: 🅰 Aggressive: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: 🅰 Aggressive: 🚀 Leverage 1️⃣x
 3️⃣0️⃣ : 🛠️ Roadmap 
 🛠️• 14/ 01 /2023 : Titan THEMIS Launch 
 🛠️• Updates January/2023 : 
    •  📚 Tutorials for Automation 🤖 already Available : ✔️ 
    • ✔️ Discord
    • ✔️ Wundertrading
    • ✔️ Zignaly
    •  📚 Tutorials for Automation 🤖 In Preparation : ⭕ 
    • ⭕ Telegram
    • ⭕ Twitter
    • ⭕ 3comnas
    • ⭕ Aleeert
    • ⭕ Alertatron
    • ⭕ Uniswap-v3
    • ⭕ Copy-Trading
 🛠️• Updates February/2023 : 
    • 📰 Launch of advertising material for Titan Affiliates 🛸
    • 🛍️🎥🖼️📊 (Sales Page/VSL/Videos/Creative/Infographics)
 🛠️• 28/05/2023 :  Titan THEMIS  update  ▬  Version 2.7 
 🛠️• 28/05/2023 :   BOT BOB release  ▬ Version 1.0
    • (Native Titan THEMIS Automation - Through BOT BOB, a bot for automation of signals, indicators and strategies of TradingView, of own code ▬ in validation.
    • BOT BOB
       Automation/Connection :
    • API - For Centralized Brokers.
    • Smart Contracts - Wallet Web - For Decentralized Brokers.
    • This way users can automate any indicator or strategy of TradingView and Titan in a decentralized, secure and simplified way.
    • Without having the need to use 'third party services' for automating TradingView indicators and strategies like the ones available above.
 🛠️• 28/05/2023 :  Release ▬ Titan  Culture Guide  📝
 3️⃣1️⃣ : 🧻 Notes ❕ 
🧻 • Note ❕ The "Demo 🐄" version, ❌does not have 'integrated automation', to automate the signals of this strategy and enjoy a fully automated system, you need to have access to the Pro version with '100% integrated automation' and all the tutorials for automation available. Become a Titan Pro 👽
🧻 • Note ❕ You will also need to be a "Pro User or higher on Tradingview", to be able to use the webhook feature available only for 'paid' profiles on the platform.
With the webhook feature it is possible to send the signals of this strategy to almost anywhere, in our case to centralized or decentralized brokerages, also to popular messaging services such as: Discord, Telegram or Twiter.
 3️⃣2️⃣ : 🚨 Disclaimer ❕❗ 
🚨 • Disclaimer ❕❕ Past positive result and performance of a system does not guarantee its positive result and performance for the future!
🚨 • Disclaimer ❗❗❗ When using this strategy: Titan Investments is totally Exempt from any claim of liability for losses. The responsibility on the management of your funds is solely yours. This is a very high risk/volatility market! Understand your place in the market.
 3️⃣3️⃣ : ♻️ ® No Repaint 
This Strategy does not Repaint! This is a real strategy!
 3️⃣4️⃣ : 🔒 Copyright ©️ 
Copyright © 2022-2023 All rights reserved, ® Titan Investimentos
 3️⃣5️⃣ : 👏 Acknowledgments 
I want to start this message in thanks to TradingView and all the Pinescript community for all the 'magic' created here, a unique ecosystem! rich and healthy, a fertile soil, a 'new world' of possibilities, for a complete deepening and improvement of our best personal skills.
I leave here my immense thanks to the whole community: Tradingview, Pinecoders, Wizards and Moderators.
I was not born Rich .
Thanks to TradingView and pinescript and all its transformation.
I could develop myself and the best of me and the best of my skills.
And consequently build wealth and patrimony.
Gratitude.
One more story for the  infinite book !
If you were born  poor  you were born to be  rich !
Raising🔼 the level and raising🔼 the ruler! 📏
My work is my 'debauchery'! Do better! 💐🌹
Soul of a first-timer! Creativity Exudes! 🦄
This is the manifestation of God's magic in me. This is the best of me. 🧙
You will copy me, I know. So you owe me. 💋
My mission here is to raise the consciousness and self-esteem of all Titans and Titanids! Welcome! 🧘 🏛️
 The only way to accomplish great work is to do what you love ! Before I learned to program I was wasting my life!
 Death  is the  best   creation  of  life .
Now you are the  new , but in the not so distant  future  you will gradually become the  old . Here I stay forever!
Playing the game like an Athlete! 🖼️ Enjoy and Enjoy 🍷 🗿
In honor of: BOB ☆
1 name, 3 letters, 3 possibilities, and if read backwards it's the same thing, a palindrome. ☘
Gratitude to the oracles that have enabled me the 'luck' to get this far: Dal&Ni&Fer
 3️⃣6️⃣ : 👮 House Rules : 📺 TradingView 
 House Rules :  This publication and strategy follows all TradingView house guidelines and rules:
📺 TradingView House Rules: www.tradingview.com
📺 Script publication rules:    www.tradingview.com
📺 Vendor requirements:      www.tradingview.com
📺 Links/References rules:    www.tradingview.com
 3️⃣7️⃣ : 🏛️ Become a Titan Pro member 👽 
🟩 Titan Pro 👽 🟩         
 3️⃣8️⃣ : 🏛️ Be a member Titan Aff 🛸 
🟥 Titan Affiliate 🛸 🟥  
Titan Investments|Quantitative THEMIS|Demo|BINANCE:BTCUSDTP:4hInvestment Strategy (Quantitative Trading)
| 🛑 | Watch "LIVE" and 'COPY' this strategy in real time:
          🔗 Link: www.tradingview.com
 
 Hello, welcome, feel free 🌹💐
 
Since the stone age to the most technological age, one thing has not changed, that which continues  impress   human  beings the most, is the  other   human  being!
 Deep down, it's all very simple or very complicated, depends on how you look at it. 
I believe that everyone was born to do something very well in life.
But few are those who have, let's use the word  'luck' .
Few are those who have the  'luck'  to discover this thing.
That is why few are happy and successful in their jobs and professions.
Thank God I had this  'luck' , and discovered what I was born to do well.
And I was born to program. 👨💻
📋 Summary :  Project Titan
0️⃣     : 🦄 Project Titan
1️⃣     : ⚖️ Quantitative THEMIS
2️⃣     : 🏛️ Titan Community
3️⃣     : 👨💻 Who am I ❔
4️⃣     : ❓ What is Statistical/Probabilistic Trading ❓
5️⃣     : ❓ How Statistical/Probabilistic Trading works ❓
6️⃣     : ❓ Why use a Statistical/Probabilistic system ❓
7️⃣     : ❓ Why the human brain is not prepared to do Trading ❓
8️⃣     : ❓ What is Backtest ❓
9️⃣     : ❓ How to build a Consistent system ❓
🔟     : ❓ What is a Quantitative Trading system ❓
1️⃣1️⃣ : ❓ How to build a Quantitative Trading system ❓
1️⃣2️⃣ : ❓ How to Exploit Market Anomalies ❓
1️⃣3️⃣ : ❓ What Defines a Robust, Profitable and Consistent System ❓
1️⃣4️⃣ : 🔧 Fixed Technical
1️⃣5️⃣ : ❌ Fixed Outputs : 🎯 TP(%) & 🛑SL(%)
1️⃣6️⃣ : ⚠️ Risk Profile
1️⃣7️⃣ : ⭕ Moving Exits : (Indicators)
1️⃣8️⃣ : 💸 Initial Capital
1️⃣9️⃣ : ⚙️ Entry Options
2️⃣0️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Third-Party Services'
2️⃣1️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Exchanges
2️⃣2️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Messaging Services'
2️⃣3️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : '🧲🤖Copy-Trading'
2️⃣4️⃣ : ❔ Why be a Titan Pro 👽❔
2️⃣5️⃣ : ❔ Why be a Titan Aff 🛸❔
2️⃣6️⃣ : 📋 Summary : ⚖️ Strategy: Titan Investments|Quantitative THEMIS|Demo|BINANCE:BTCUSDTP:4h
2️⃣7️⃣ : 📊 PERFORMANCE : 🆑 Conservative
2️⃣8️⃣ : 📊 PERFORMANCE : Ⓜ️ Moderate
2️⃣9️⃣ : 📊 PERFORMANCE : 🅰 Aggressive
3️⃣0️⃣ : 🛠️ Roadmap
3️⃣1️⃣ : 🧻 Notes ❕
3️⃣2️⃣ : 🚨 Disclaimer ❕❗
3️⃣3️⃣ : ♻️ ® No Repaint
3️⃣4️⃣ : 🔒 Copyright ©️
3️⃣5️⃣ : 👏 Acknowledgments
3️⃣6️⃣ : 👮 House Rules : 📺 TradingView
3️⃣7️⃣ : 🏛️ Become a Titan Pro member 👽
3️⃣8️⃣ : 🏛️ Be a member Titan Aff 🛸 
 0️⃣ : 🦄 Project Titan 
This is the  first  real, 100% automated  Quantitative   Strategy  made available to the public and the pinescript community for TradingView.
You will be able to  automate  all  signals  of this strategy for your  broker ,  centralized  or  decentralized  and also for  messaging   services : Discord, Telegram or Twitter .
This is the  first   strategy  of a larger project, in 2023, I will provide a total of 6 100% automated  'Quantitative'  strategies to the pinescript community for TradingView.
The future strategies to be shared here will also be  unique , never before seen, real  'Quantitative'  bots with real, validated results in real operation.
Just like the  'Quantitative THEMIS'  strategy, it will be something out of the loop throughout the pinescript/tradingview community, truly unique tools for building mutual wealth consistently and continuously for our community.
 1️⃣ : ⚖️ Quantitative THEMIS :  Titan Investments|Quantitative THEMIS|Demo|BINANCE:BTCUSDTP:4h 
This is a truly unique and out of the curve strategy for  BTC /USD .
A truly real strategy, with real, validated results and in real operation.
A unique tool for building mutual wealth, consistently and continuously for the members of the Titan community.
Initially we will operate on a monthly, quarterly, annual or biennial subscription service.
Our goal here is to build a great community, in exchange for an extremely fair value for the use of our truly unique tools, which bring and will bring real results to our community members.
With this business model it will be possible to provide all Titan users and community members with the purest and highest degree of sophistication in the market with pinescript for tradingview, providing unique and truly profitable strategies.
My goal here is to offer the best to our members!
The best 'pinescript' tradingview service in the world!
We are the only Start-Up in the world that will decentralize real and full access to truly real 'quantitative' tools that bring and will bring real results for mutual and ongoing wealth building for our community.
 2️⃣ : 🏛️ Titan Community : 👽 Pro 🔁 Aff 🛸 
 Become a Titan Pro 👽 
To get access to the strategy:  "Quantitative THEMIS" , and future Titan strategies in a 100% automated way, along with all tutorials for automation.
 Pro Plans:  30 Days, 90 Days, 12 Months, 24 Months.
👽 Pro 🅼 Monthly
👽 Pro 🆀 Quarterly
👽 Pro🅰 Annual
👽 Pro👾Two Years
You will have access to a truly  unique  system that is  out   of   the   curve .
A 100% real, 100% automated, tested, validated, profitable, and in  real operation  strategy.
 Become a Titan Affiliate 🛸 
By becoming a Titan Affiliate 🛸, you will  automatically   receive   50%  of the value of each  new   subscription  you  refer .
You will  receive   50%  for any of the above  plans  that you  refer .
This way we will encourage our community to grow in a fair and healthy way, because we know what we have in our hands and what we deliver real value to our users.
We are at the highest level of sophistication in the market, the consistency here and the results here speak for themselves.
So growing our community means growing mutual wealth and raising collective conscience.
 Wealth must be created not divided. 
And here we are creating mutual wealth on all ends and in all ways.
A non-zero sum system, where everybody wins.
 3️⃣ : 👨💻 Who am I ❔ 
My name is  FilipeSoh  I am 26 years old, Technical Analyst, Trader, Computer Engineer, pinescript Specialist, with extensive experience in several languages and technologies.
For the last 4 years I have been focusing on developing, editing and creating pinescript indicators and strategies for Tradingview for people and myself.
Full-time passionate workaholic pinescript developer with over 10,000 hours of pinescript development.
• Pinescript expert ▬Tradingview.
• Specialist in Automated Trading
• Specialist in Quantitative Trading.
• Statistical/Probabilistic Trading Specialist - Mark Douglas Scholl.
• Inventor of the 'Classic Forecast' Indicators.
• Inventor of the 'Backtest Table'.
 4️⃣ : ❓ What is Statistical/Probabilistic Trading ❓ 
Statistical/probabilistic trading is the  only   way  to get a positive mathematical expectation regarding the market and consequently that is the  only   way  to make money consistently from it.
I will present below some more details about the  Quantitative THEMIS  strategy, it is a real strategy, tested, validated and in real operation,  'Skin in the Game' , a consistent way to make money with statistical/probabilistic trading in a 100% automated.
I am a  Technical Analyst , I used to be a  Discretionary Trader , today I am 100% a  Statistical Trader .
I've gotten rich and made a lot of money, and I've also lost a lot with 'leverage'.
That was a few years ago.
The book that changed everything for me was  "Trading in The Zone"  by Mark Douglas.
That's when I understood that the market is just a game of statistics and probability, like a casino!
It was then that I understood that the human brain is not prepared for trading, because it involves triggers and mental emotions.
And emotions in trading and in making trading decisions do not go well together, not in the long run, because you always have the burden of being wrong with the outcome of that particular position.
 But remembering that the market is just a statistical game! 
 5️⃣ : ❓ How Statistical/Probabilistic Trading works ❓ 
Let's use a  'coin'  as an example:
If we toss a  'coin'  up 10 times.
Do you agree that it is impossible for us to know exactly the result of the 'plays' before they actually happen?
As in the example above, would you agree, that we cannot  "guess"  the outcome of a position before it actually happens?
As much as we cannot  "guess"  whether the coin will drop  heads  or  tails  on each flip.
We can analyze the  "backtest"  of the 10 moves made with that coin:
If we analyze the 10 moves and count the number of times the coin fell heads or tails in a specific sequence, we then have a percentage of times the coin fell heads or tails, so we have a 'backtest' of those moves.
Then on the next flip we can now assume a point or a favorable  position  for one side,  the side with the highest probability .
In a nutshell, this is more or less how probabilistic statistical trading works.
As Statistical Traders we can never say whether such a Trader/Position we take will be a winner or a loser.
But still we can have a positive and consistent result in a  "sequence"  of trades, because before we even open a position, backtests have already been performed so we identify an anomaly and build a system that will have a positive statistical advantage in our favor over the market.
The advantage will not be in one trade itself, but in the  "sequence"  of trades as a whole!
Because our system will work like a casino, having a positive mathematical expectation relative to the players/market.
Design, develop, test models and systems that can take advantage of market anomalies, until they change.
 Be the casino! - Mark Douglas 
 6️⃣ : ❓ Why use a Statistical/Probabilistic system ❓ 
In recent years I have focused and specialized in developing 100% automated trading systems, essentially for the cryptocurrency market.
I have developed many extremely robust and efficient systems, with positive mathematical expectation towards the market.
These are  not   complex   systems   per   se , because here we want to avoid  'over-optimization'  as much as possible.
 As Da Vinci said: "Simplicity is the highest degree of sophistication". 
I say this because I have tested, tried and developed hundreds of systems/strategies.
I believe I have programmed more than 10,000 unique indicators/strategies, because this is my passion and purpose in life.
 I am passionate about what I do, completely! 
I love statistical trading because it is the only way to get consistency in the long run!
This is why I have studied, applied, developed, and specialized in 100% automated cryptocurrency trading systems.
The reason why our systems are extremely "simple" is because, as I mentioned before, in statistical trading we want to exploit the market anomaly to the maximum, that is, this anomaly will change from time to time, usually we can exploit a trading system efficiently for about 6 to 12 months, or for a few years, that is; for fixed 'scalpers' systems.
Because at some point these  anomalies  will be  identified , and from the moment they are  identified  they will be  exploited  and will stop being  anomalies .
With the system presented here; you can even  copy  the  indicators  and input  values  shared here;
However; what I have to offer you is: it  is me ,  our team , and  our community !
That is, we will  constantly   monitor  this system,  for life , because our goal here is to create a  unique ,  perpetual ,  profitable , and  consistent  system for our community.
 Myself ,  our team  and  our community  will keep this  script   periodically   updated , to ensure the  positive   mathematical   expectation  of it.
So we don't mind sharing the current  parameters  and  values , because the real value is also in the  future   updates  that this system will receive  from me  and  our team , guided by our culture and  our community  of  real users !
As we are  hosted  on 'tradingview', all future  updates  for this strategy, will be  implemented  and  updated   automatically  on your tradingview account.
What we want here is: to make sure  you get gains  from our system, because if  you get gains , our ecosystem will grow as a whole in a  healthy  and  scalable  way, so we will be  generating continuous mutual wealth and raising the collective consciousness .
 People Need People: 3️⃣🅿 
 7️⃣ : ❓ Why the human brain is not prepared to do Trading ❓ 
Today my greatest skill is to develop statistically profitable and 100% automated strategies for 'pinescript' tradingview.
Note that I said: 'profitable' because in fact statistical trading is the only way to make money in a 'consistent' way from the market.
And consequently have a positive wealth curve every cycle, because we will be based on mathematics, not on feelings and news.
Because the human brain is not prepared to do trading.
Because trading is connected to the decision making of the cerebral cortex.
And the decision making is automatically linked to emotions, and emotions don't match with trading decision making, because in those moments, we can feel the best and also the worst sensations and emotions, and this certainly affects us and makes us commit grotesque mistakes!
That's why the human brain is not prepared to do trading.
If you want to participate in a fully automated, profitable and consistent trading system; be a Titan Pro 👽
I believe we are walking an extremely enriching path here, not only in terms of financial returns for our community, but also in terms of knowledge about probabilistic and automated statistical trading.
You will have access to an extremely robust system, which was built upon very strong concepts and foundations, and upon the world's main asset in a few years: Bitcoin .
We are the tip of the best that exists in the cryptocurrency market when it comes to probabilistic and automated statistical trading.
 Result is result! Me being dressed or naked. 
 This is just the beginning! 
But there is a way to consistently make money from the market.
 Being the Casino! - Mark Douglas 
 8️⃣ : ❓ What is Backtest ❓ 
Imagine the market as a purely random system, but even in 'randomness' there are patterns.
So now imagine the market and statistical trading as follows:
Repeating the above 'coin' example, let's think of it as follows:
If we toss a coin up 10 times again.
It is impossible to know which flips will have heads or tails, correct?
But if we analyze these 10 tosses, then we will have a mathematical statistic of the past result, for example, 70 % of the tosses fell 'heads'.
That is:
7 moves fell on  "heads" .
3 moves fell on  "tails" .
So based on these conditions and on the generic backtest presented here, we could adopt " heads " as our system of moves, to have a statistical and probabilistic advantage in relation to the next move to be performed.
That is, if you define a system, based on  backtests , that has a robust positive mathematical expectation in relation to the market you will have a profitable system.
For every move you make you will have a positive statistical advantage in your favor over the market before you even make the move.
Like a casino in relation to all its players!
The casino does not have an advantage over one specific player, but over all players, because it has a positive mathematical expectation about all the moves that night.
The casino will always have a positive statistical advantage over its players.
Note that there will always be real players who will make real, million-dollar bankrolls that night, but this condition is already built into the casino's 'strategy', which has a pre-determined positive statistical advantage of that night as a whole.
 Statistical trading is the same thing, as long as you don't understand this you will keep losing money and consistently. 
 9️⃣ : ❓ How to build a Consistent system ❓ 
See most traders around the world perform trades believing that that specific position taken will make them filthy rich, because they simply believe faithfully that the position taken will be an undoubted winner, based on a trader's methodology: 'trading a trade' without analyzing the whole context, just using 'empirical' aspects in their system.
But if you think of trading, as a  sequence  of moves.
You see,  'a sequence' !
When we think statistically, it doesn't matter your  result  for  this , or for the  next  specific  trade , but the final  sequence  of trades as a whole.
As the market has a  random  system of  results   distribution , if your system has a positive statistical advantage in relation to the market, at the end of that  sequence  you'll have the biggest probability of having a  winning  bank.
 That's how you do real trading! 
 And with consistency! 
Trading is a long term game, but when you change the key you realize that it is a simple game to make money in a consistent way from the market, all you need is patience.
Even more when we are based on Bitcoin, which has its 'Halving' effect where, in theory, we will never lose money in 3 to 4 years intervals, due to its scarcity and the fact that Bitcoin is the 'discovery of digital scarcity' which makes it the digital gold, we believe in this thesis and we follow Satoshi's legacy.
So align Bitcoin with a probabilistic statistical trading system with a positive mathematical expectation of the market and 100% automated with the long term, and all you need is patience, and you will become rich.
In fact Bitcoin by itself is already a path, buy, wait for each halving and your wealth will be maintained.
No inflation, unlike fiat currencies.
This is a complete and extremely robust strategy, with the most current possible and 'not possible' techniques involved and applied here.
Today I am at another level in developing 100% automated 'quantitative' strategies.
 I was born for this! 
 🔟 : ❓ What is a Quantitative Trading system ❓ 
In addition to having access to a  revolutionary   strategy  you will have access to  disruptive  100% multifunctional  tables  with the ability to perform  'backtests'  for better tracking and monitoring of your system on a customized basis.
 I would like to emphasize one thing, and that is that you keep this in mind. 
Today my greatest skill in 'pinescript' is to build indicators, but mainly strategies, based on statistical and probabilistic trading, with a postive mathematical expectation in relation to the market, in a 100% automated way.
This with the goal of building a consistent and continuous positive equity curve through mathematics using data, converting it into statistical / probabilistic parameters and applying them to a Quantitative model.
Before becoming a  Quantitative Trader , I was a  Technical Analyst  and a  Discretionary Trader .
First as a position trader and then as a day trader.
Before becoming a Trader, I trained myself as a  Technical Analyst , to masterly understand the shape and workings of the market in theory.
But everything changed when I met  'Mark Douglas' , when I got to know his works, that's when my head exploded 🤯, and I started to understand the market for good!
The market is nothing more than a  'random'  system of distributing results.
See that I said:  'random' .
Do yourself a mental exercise.
Is there really such a thing as  random ?
I believe not, as far as we know maybe the 'singularity'.
So thinking this way, to translate, the market is nothing more than a game of probability, statistics and pure mathematics.
Like a casino!
What happens is that most traders, whenever they take a position, take it with all the empirical certainty that such position will win or lose, and do not take into consideration the total sequence of results to understand their place in the market.
Understanding your place in the market gives you the ability to create and design systems that can exploit the present market anomaly, and thus make money statistically, consistently, and 100% automated.
Thinking of it this way, it is easy to make money from the market.
There are many ways to make money from the market, but the only consistent way I know of is through 'probabilistic and automated statistical trading'.
 1️⃣1️⃣ : ❓ How to build a Quantitative Trading system ❓ 
There are some fundamental points that must be addressed here in order to understand what makes up a system based on statistics and probability applied to a quantitative model.
When we talk about 'discretionary' trading, it is a trading system based on  human   decisions  after the defined 'empirical' conditions are met.
It is quite another thing to build a  fully   automated   system  without any  human interference/interaction .
That said:
Building a statistically profitable system is perfectly possible,  but this is a high level task , but with possible high rewards and consistent gains.
Here you will find a real  "Skin In The Game"  strategy.
With all due respect, but the vast majority of traders who post  strategies  on TradingView do not understand what they are doing.
Most of them do not understand the minimum complexity involved in the main variable for the construction of a real strategy, the mother variable: "strategy".
I say this by my own experience, because I have analyzed practically all the existing publications of TradingView + 200,000 indicators and strategies.
I breathe pinescript, I eat pinescript, I sleep pinescript, I bathe pinescript, I live TradingView.
But the main advantage for the TradingView users, is that all entry and exit orders made by this strategy can be checked and analyzed thoroughly, to validate and prove the veracity of this strategy, because this is a 100% real strategy.
Here there is a huge world of possibilities, but only one way to build a  'pinescript strategy'  that will work correctly aligned to the real world with  real results .
There are some  fundamental   points  to take into consideration when  building  a profitable trading system:
The most important of these for me is:  'DrawDown' .
Followed by:  'Hit Rate' .
And only after that we use the parameter: 'Profit'.
See, this is because here, we are dealing with the  'imponderable' , and anything can happen in this scenario.
But there is one thing that makes us sleep peacefully at night, and that is:  controlling losses .
That is, in other words:  controlling  the  DrawDown .
The amateur is concerned with 'winning', the professional is concerned with conserving capital.
If we have the losses under control, then we can move on to the other two parameters: hit rate and profit.
See, the second most important factor in building a system is the hit rate.
I say this from my own experience.
I have worked with many systems with a 'low hit rate', but extremely profitable.
For example: systems with hit rates of 40 to 50%.
But as much as statistically and mathematically the profit is rewarding, operating systems with a low hit rate is always very stressful psychologically.
That's why there are two big reasons why when I build an automated trading system, I focus on the high hit rate of the system, they are
1 -  To reduce psychological damage as much as possible .
2 -  And more important , when we create a system with a  'high hit rate' , there is a huge intrinsic advantage here, that most statistic traders don't take in consideration.
 That is: knowing more quickly when the system stops being functional. 
The main  advantage  of a system with a  high hit rate  is: to identify when the system stops being functional and stop exploiting the market's anomaly.
Look: When we are talking about trading and random distribution of results on the market, do you agree that when we create a trading system, we are focused on exploring some  anomaly  of that market?
When that anomaly is verified by the market, it will stop being functional with time.
That's why trading systems, 'scalpers', especially for cryptocurrencies, need constant monitoring, quarterly, semi-annually or annually.
Because market movements change from time to time.
Because we go through different cycles from time to time, such as congestion cycles,  accumulation ,  distribution ,  volatility ,  uptrends  and  downtrends .
 1️⃣2️⃣ : ❓ How to Exploit Market Anomalies ❓ 
 You see there is a very important point that must be stressed here. 
As we are always trying to exploit an  'anomaly'  in the market.
So the 'number' of indicators/tools that will integrate the system is of paramount importance.
But most traders do not take this into consideration.
To build a professional, robust, consistent, and profitable system, you don't need to use hundreds of indicators to build your setup.
This will actually make it harder to read when the setup stops working and needs some adjustment.
So focusing on a  high hit rate   is very important  here,  this is a fundamental principle that is widely ignored , and with a high hit rate, we can know much more accurately when the system is no longer functional much faster.
 As Darwin said: "It is not the strongest or the most intelligent that wins the game of life, it is the most adapted. 
So simple systems, as contradictory as it may seem, are more efficient, because they help to identify inflection points in the market much more quickly.
 1️⃣3️⃣ : ❓ What Defines a Robust, Profitable and Consistent System ❓ 
See I have built, hundreds of thousands of indicators and 'pinescript' strategies, hundreds of thousands.
This is an extremely professional, robust and profitable system.
Based on the currency pairs: BTC /USDT
There are many ways and avenues to build a profitable trading setup/system.
And actually this is not a difficult task, taking in consideration, as the main factor here, that our trading and investment plan is for the long term, so consequently we will face scenarios with less noise.
He who is in a hurry eats raw.
As mentioned before.
Defining trends in pinescript is technically a simple task, the hardest task is to determine congestion zones with low volume and volatility, it's in these moments that many false signals are generated, and consequently is where most setups face their maximum DrawDown.
That's why this strategy was strictly and thoroughly planned, built on a very solid foundation, to avoid as much noise as possible, for a positive and consistent equity curve in each market cycle, 'Consistency' is our 'Mantra' around here.
 1️⃣4️⃣ : 🔧 Fixed Technical 
 • Strategy:      Titan Investments|Quantitative THEMIS|Demo|BINANCE:BTCUSDTP:4h
• Pair:             BTC/USDTP
• Time Frame: 4 hours
• Broker:         Binance (Recommended) 
For a more conservative scenario, we have built the Quantitative THEMIS for the 4h time frame, with the main focus on consistency.
So we can avoid noise as much as possible!
 1️⃣5️⃣ : ❌ Fixed Outputs : 🎯 TP(%) & 🛑SL(%) 
In order to build a 'perpetual' system specific to BTC/USDT, it took a lot of testing, and more testing, and a lot of investment and research.
There is one initial and fundamental point that we can address to justify the incredible consistency presented here.
 That fundamental point is our exit via Take Profit or Stop Loss percentage (%). 
 🎯 Take Profit (%) 
 🛑 Stop Loss (%) 
See, today I have been testing some more  advanced backtesting models  for some cryptocurrency systems.
In which I perform 'backtest of backtest', i.e. we use a set of strategies each focused on a principle, operating individually, but they are part of something unique, i.e. we do 'backtests' of 'backtests' together.
What I mean is that we do a lot of backtesting around here.
I can assure you, that always the best output for a trading system is to set fixed output values!
In other words:
 🎯 Take Profit (%) 
 🛑 Stop Loss (%) 
This happens because statistically setting fixed exit structures in the vast majority of times, presents a superior result on the capital/equity curve, throughout history and for the vast majority of setups compared to other exit methods.
This is due to a mathematical principle of simplicity, 'avoiding more noise'.
 Thus whenever the Quantitative THEMIS strategy takes a position it has a target and a defined maximum stop percentage. 
 1️⃣6️⃣ : ⚠️ Risk Profile 
The strategy, currently has  3 risk profiles  ⚠️ patterns for 'fixed percentage exits':  Take Profit (%)  and  Stop Loss (%) .
 They are: ⚠️ Rich's Profiles 
✔️🆑 Conservative: 🎯 TP=2.7 % 🛑 SL=2.7 %
❌Ⓜ️ Moderate:     🎯 TP=2.8 % 🛑 SL=2.7 %
❌🅰 Aggressive:    🎯 TP=1.6 % 🛑 SL=6.9 %
You will be able to select and switch between the above options and profiles through the 'input' menu of the strategy by navigating to the "⚠️ Risk Profile" menu.
You can then  select, test and apply the Risk Profile above  that best suits your  risk management, expectations and reality , as well as customize all the 'fixed exit' values through the TP and SL menus below.
 1️⃣7️⃣ : ⭕ Moving Exits : (Indicators) 
The strategy currently also has  'Moving Exits'  based on indicator signals.
 These are Moving Exits (Indicators) 
📈 LONG : (EXIT)
🧃 (MAO) Short : true
📉 SHORT : (EXIT)
🧃 (MAO) Long: false
You can select and toggle between the above options through the 'input' menu of the strategy by navigating to the "LONG : Exit" and "SHORT : Exit" menu.
 1️⃣8️⃣ : 💸 Initial Capital 
By default the  "Initial Capital"  set for  entries  and  backtests  of this strategy is:  10000 $ 
You can set another value for the 'Starting Capital' through the tradingview menu under  "properties" , and edit the value of the  "Initial Capital"  field.
This way you can set and test other 'Entry Values' for your trades, tests and backtests.
 1️⃣9️⃣ : ⚙️ Entry Options 
By default the 'order size' set for this strategy is 100 % of the 'initial capital' on each new trade.
You can set and test other  entry options like :  contracts ,  cash ,  % of equity 
You should make these changes directly in the input menu of the strategy by navigating to the menu  "⚙️ Properties : TradingView"  below.
⚙️ Properties : (TradingView)
📊 Strategy Type:   strategy.position_size != 1
📝💲 % Order Type: % of equity
📝💲 % Order Size: 100
Leverage:             1
So you can define and test other 'Entry Options' for your trades, tests and backtests.
 2️⃣0️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Third-Party Services' 
 
 It is possible to automate the signals of this strategy for any centralized or decentralized broker, as well as for messaging services: Discord, Telegram and Twitter. 
All in an extremely simple and uncomplicated way through the tutorials available in PDF /VIDEO for our Titan Pro 👽 subscriber community.
With our tutorials in PDF and Video it will be possible to automate the signals of this strategy for the chosen service in an extremely simple way with less than 10 steps only.
Tradingview naturally doesn't count with native integration between brokers and tradingview.
But it is possible to use 'third party services' to do the integration and automation between Tradingview and your centralized or decentralized broker.
Here are the standard, available and recommended 'third party services' to automate the signals from the 'Quantitative THEMIS' strategy on the tradingview for your broker:
1) Wundertrading (Recommended): 
2) 3commas:                               
3) Zignaly:                                  
4) Aleeert.com    (Recommended): 
5) Alertatron:                              
Note! 'Third party services' cannot perform 'withdrawals' via their key 'API', they can only open positions, so your funds will always be 'safe' in your brokerage firm, being traded via the 'API', when they receive an entry and exit signal from this strategy.
 2️⃣1️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Exchanges 
You can automate this strategy for any of the brokers below, through your broker's 'API' by connecting it to the 'third party automation services' for tradingview available and mentioned in the menu above:
1) Binance (Recommended)
2) Bitmex
3) Bybit
4) KuCoin
5) Deribit
6) OKX
7) Coinbase
8) Huobi
9) Bitfinex
10) Bitget
11) Bittrex
12) Bitstamp
13) Gate. io
14) Kraken
15) Gemini
16) Ascendex
17) VCCE
 2️⃣2️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : 'Messaging Services' 
You can also automate and monitor the signals of this strategy much more efficiently by sending them to the following popular messaging services:
1) Discord
2) Telegram
3) Twitter
 2️⃣3️⃣ : ❓ How to Automate this Strategy ❓ : 🤖 Automation : '🧲🤖Copy-Trading' 
It will also be possible to copy/replicate the entries and exits of this strategy to your broker in an extremely simple and agile way, through the available copy-trader services.
This way it will be possible to replicate the signals of this strategy at each entry and exit to your broker through the API connecting it to the integrated copy-trader services available through the tradingview automation services below:
1) Wundetrading: 
2) Zignaly:          
 2️⃣4️⃣ : ❔ Why be a Titan Pro 👽❔ 
I believe that today I am at another level in 'pinescript' development.
I consider myself today a true unicorn as a pinescript developer, someone unique and very rare.
If you choose another tool or another pinescript service, this tool will be just another one, with no real results.
But if you join our Titan community, you will have access to a unique tool! And you will get real results!
I already earn money consistently with statistical and automated trading and as an expert pinescript developer.
I am here to evolve my skills as much as possible, and one day become a pinescript 'Wizard'.
So excellence, quality and professionalism will always be my north here.
You will never find a developer like me, and who will take so seriously such a revolutionary project as this one. A Maverick! ▬ The man never stops!
Here you will find the highest degree of sophistication and development in the market for 'pinescript'.
You will get the best of me and the best of pinescript possible.
Let me show you how a professional in my field does it.
Become a Titan Pro Member 👽 and get Full Access to this strategy and all the Automation Tutorials.
 Be the Titan in your life! 
 2️⃣5️⃣ : ❔ Why be a Titan Aff 🛸❔ 
Get financial return for your referrals, Decentralize the World, and raise the collective consciousness.
 2️⃣6️⃣ : 📋 Summary : ⚖️ Strategy: Titan Investments|Quantitative THEMIS|Demo|BINANCE:BTCUSDTP:4h 
® Titan Investimentos | Quantitative THEMIS ⚖️ | Demo 🐄 2.6 | Dev: © FilipeSoh 🧙 | 🤖 100% Automated : Discord, Telegram, Twitter, Wundertrading, 3commas, Zignaly, Aleeert, Alertatron, Uniswap-v3 | BINANCE:BTCUSDTPERP 4h
🛒 Subscribe this strategy  ❗️  Be a Titan Member 🏛️
🛒 Titan Pro        👽  🔗   🏛️ Titan Pro        👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO)
🛒 Titan Affiliate 🛸  🔗 🏛️ Titan Affiliate 🛸 (Subscription Sale) 🔥 Receive 50% commission
📋 Summary : QT THEMIS ⚖️
🕵️♂️ Check This Strategy..................................................................0
🦄 ® Titan Investimentos...............................................................1
👨💻 © Developer..........................................................................2
📚 Signal Automation Tutorials : (PDF/VIDEO).......................................3
👨🔧 Revision...............................................................................4
📊 Table : (BACKTEST)..................................................................5
📊 Table : (INFORMATIONS).............................................................6
⚙️ Properties : (TRADINGVIEW)........................................................7
📆 Backtest : (TRADINGVIEW)..........................................................8
⚠️ Risk Profile...........................................................................9
🟢 On 🔴 Off : (LONG/SHORT).......................................................10
📈 LONG : (ENTRY)....................................................................11
📉 SHORT : (ENTRY)...................................................................12
📈 LONG : (EXIT).......................................................................13
📉 SHORT : (EXIT)......................................................................14
🧩 (EI) External Indicator.............................................................15
📡 (QT) Quantitative...................................................................16
🎠 (FF) Forecast......................................................................17
🅱 (BB) Bollinger Bands................................................................18
🧃 (MAP) Moving Average Primary......................................................19
🧃 (MAP) Labels.........................................................................20
🍔 (MAQ) Moving Average Quaternary.................................................21
🍟 (MACD) Moving Average Convergence Divergence...............................22
📣 (VWAP) Volume Weighted Average Price........................................23
🪀 (HL) HILO..........................................................................24
🅾 (OBV) On Balance Volume.........................................................25
🥊 (SAR) Stop and Reverse...........................................................26
🛡️ (DSR) Dynamic Support and Resistance..........................................27
🔊 (VD) Volume Directional..........................................................28
🧰 (RSI) Relative Momentum Index.................................................29
🎯 (TP) Take Profit %..................................................................30
🛑 (SL) Stop Loss %....................................................................31
🤖 Automation Selected...............................................................32
📱💻 Discord............................................................................33
📱💻 Telegram..........................................................................34
📱💻 Twitter...........................................................................35
🤖 Wundertrading......................................................................36
🤖 3commas............................................................................37
🤖 Zignaly...............................................................................38
🤖 Aleeert...............................................................................39
🤖 Alertatron...........................................................................40
🤖 Uniswap-v3..........................................................................41
🧲🤖 Copy-Trading....................................................................42
♻️ ® No Repaint........................................................................43
🔒 Copyright ©️..........................................................................44
🏛️ Be a Titan Member..................................................................45
Nº Active Users..........................................................................46
⏱ Time Left............................................................................47
| 0 | 🕵️♂️ Check This Strategy
        🕵️♂️ Version Demo: 🐄 Version with ❌non-integrated automation 🤖 and 📚 Tutorials for automation ❌not available 
        🕵️♂️ Version Pro: 👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO) 
| 1 | 🦄 ® Titan Investimentos
        Decentralizing the World 🗺
        Raising the Collective Conscience 🗺
       
        🦄Site:             
        🦄TradingView: www.tradingview.com
        🦄Discord:        
        🦄Telegram:     
        🦄Youtube:       
        🦄Twitter:        
        🦄Instagram:    
        🦄TikTok:        
        🦄Linkedin:      
        🦄E-mail:         
| 2 | 👨💻 © Developer
        🧠 Developer:    @FilipeSoh🧙
        📺 TradingView: www.tradingview.com
        ☑️ Linkedin:      
        ✅ Fiverr:         
        ✅ Upwork:       
        🎥 YouTube:      
        🐤 Twitter:       
        🤳 Instagram:   
| 3 | 📚 Signal Automation Tutorials : (PDF/VIDEO)
        📚 Discord:           🔗 Link: 🔒Titan Pro👽
        📚 Telegram:        🔗 Link: 🔒Titan Pro👽
        📚 Twitter:           🔗 Link: 🔒Titan Pro👽
        📚 Wundertrading: 🔗 Link: 🔒Titan Pro👽
        📚 3comnas:         🔗 Link: 🔒Titan Pro👽
        📚 Zignaly:           🔗 Link: 🔒Titan Pro👽
        📚 Aleeert:           🔗 Link: 🔒Titan Pro👽
        📚 Alertatron:       🔗 Link: 🔒Titan Pro👽
        📚 Uniswap-v3:     🔗 Link: 🔒Titan Pro👽
        📚 Copy-Trading:   🔗 Link: 🔒Titan Pro👽
| 4 | 👨🔧 Revision
        👨🔧 Start Of Operations: 01 Jan 2019 21:00 -0300 💡 Start Of Operations (Skin in the game) : Revision 1.0
        👨🔧 Previous Review:      01 Jan 2022 21:00 -0300 💡 Previous Review : Revision 2.0
        👨🔧 Current Revision:     01 Jan 2023 21:00 -0300 💡 Current Revision : Revision 2.6
        👨🔧 Next Revision:         28 May 2023 21:00 -0300 💡 Next Revision : Revision 2.7
| 5 | 📊 Table : (BACKTEST)
        📊 Table: true
        🖌️ Style:  label.style_label_left
        📐 Size:   size_small
        📏 Line:  defval
        🎨 Color: #131722
| 6 | 📊 Table : (INFORMATIONS)
        📊 Table: false
        🖌️ Style:  label.style_label_right
        📐 Size:   size_small
        📏 Line:  defval
        🎨 Color: #131722
| 7 | ⚙️ Properties : (TradingView)
        📊 Strategy Type:  strategy.position_size != 1
        📝💲 %  Order Type: % of equity
        📝💲 %  Order Size: 100 %
        🚀 Leverage:        1
| 8 | 📆 Backtest : (TradingView)
         
        🗓️ Mon:     true
        🗓️ Tue:      true
        🗓️ Wed:     true
        🗓️ Thu:      true
        🗓️ Fri:       true
        🗓️ Sat:       true
        🗓️ Sun:      true
        📆 Range:  custom
        📆 Start:    UTC 31 Oct 2008 00:00
        📆 End:      UTC 31 Oct 2030 23:45
        📆 Session: 0000-0000
        📆 UTC:     UTC
| 9 | ⚠️ Risk Profile
        ✔️🆑 Conservative: 🎯 TP=2.7 %  🛑 SL=2.7 %
        ❌Ⓜ️ Moderate:     🎯 TP=2.8 %  🛑 SL=2.7 %
        ❌🅰 Aggressive:    🎯 TP=1.6 %  🛑 SL=6.9 %
| 10 | 🟢 On 🔴 Off : (LONG/SHORT)
         🟢📈 LONG:  true
         🟢📉 SHORT: true
| 11 | 📈 LONG : (ENTRY)
         📡 (QT) Long:       true
         🧃 (MAP) Long:      false
         🅱 (BB) Long:       false
         🍟 (MACD) Long: false
         🅾 (OBV) Long:     false
| 12 | 📉 SHORT : (ENTRY)
         📡 (QT) Short:       true
         🧃 (MAP) Short:      false
         🅱 (BB) Short:       false
         🍟 (MACD) Short: false
         🅾 (OBV) Short:     false
| 13 | 📈 LONG : (EXIT)
         🧃 (MAP) Short: true
| 14 | 📉 SHORT : (EXIT)
         🧃 (MAP) Long: false
| 15 | 🧩 (EI) External Indicator
         🧩 (EI) Connect your external indicator/filter:              false
         🧩 (EI)   Connect your indicator here (Study mode only): close
         🧩 (EI)   Connect your indicator here (Study mode only): close
| 16 | 📡 (QT) Quantitative
         📡 (QT) Quantitative: true
         📡 (QT) Market:        BINANCE:BTCUSDTPERP
         📡 (QT) Dice:            openai
| 17 | 🎠 (FF) Forecast
         🎠 (FF) Include current unclosed current candle:  true
         🎠 (FF) Forecast Type:                                    flat
         🎠 (FF) Nº of candles to use in linear regression: 3
| 18 | 🅱 (BB) Bollinger Bands
         🅱 (BB) Bollinger Bands: true
         🅱 (BB) Type:               EMA
         🅱 (BB) Period:             20
         🅱 (BB) Source:            close
         🅱 (BB) Multiplier:         2
         🅱 (BB) Linewidth:        0
         🅱 (BB) Color:              #131722
| 19 | 🧃 (MAP) Moving Average Primary
         🧃 (MAP) Moving Average Primary: true
         🧃 (MAP) BarColor:                      false
         🧃 (MAP) Background:                  false
         🧃 (MAP) Type:                           SMA
         🧃 (MAP) Source:                        open
         🧃 (MAP) Period:                         100
         🧃 (MAP) Multiplier:                     2.0
         🧃 (MAP) Linewidth:                    2
         🧃 (MAP) Color P:                        #42bda8
         🧃 (MAP) Color N:                       #801922
| 20 | 🧃 (MAP) Labels
         🧃 (MAP) Labels:               true
         🧃 (MAP) Style BUY ZONE:  shape.labelup
         🧃 (MAP) Color BUY ZONE: #42bda8
         🧃 (MAP) Style SELL ZONE: shape.labeldown
         🧃 (MAP) Color SELL ZONE: #801922
| 21 | 🍔 (MAQ) Moving Average Quaternary
         🍔 (MAQ) Moving Average Quaternary: true
         🍔 (MAQ) BarColor:                          false
         🍔 (MAQ) Background:                      false
         🍔 (MAQ) Type:                                SMA
         🍔 (MAQ) Source:                              close
         🍔 (MAQ) Primary:                           14
         🍔 (MAQ) Secondary:                        22
         🍔 (MAQ) Tertiary:                           44
         🍔 (MAQ) Quaternary:                      16
         🍔 (MAQ) Linewidth:                          0
         🍔 (MAQ) Color P:                            #42bda8
         🍔 (MAQ) Color N:                            #801922
| 22 | 🍟 (MACD) Moving Average Convergence Divergence
         🍟 (MACD) Macd Type:  EMA
         🍟 (MACD) Signal Type: EMA
         🍟 (MACD) Source:       close
         🍟 (MACD) Fast:          12
         🍟 (MACD) Slow:          26
         🍟 (MACD) Smoothing:  9
| 23 | 📣 (VWAP) Volume Weighted Average Price
         📣 (VWAP) Source:             close
         📣 (VWAP) Period:              340
         📣 (VWAP) Momentum A:     84
         📣 (VWAP) Momentum B:    150
         📣 (VWAP) Average Volume: 1
         📣 (VWAP) Multiplier:          1
         📣 (VWAP) Diviser:             2
| 24 | 🪀 (HL) HILO
         🪀 (HL) Type:          SMA
         🪀 (HL) Function:     Maverick🧙
         🪀 (HL) Source H:    high
         🪀 (HL) Source L:     low
         🪀 (HL) Period:        20
         🪀 (HL) Momentum: 26
         🪀 (HL) Diviser:        2
         🪀 (HL) Multiplier:    1
| 25 | 🅾 (OBV) On Balance Volume
         🅾 (OBV) Type:        EMA
         🅾 (OBV) Source:     close
         🅾 (OBV) Period:     16
         🅾 (OBV) Diviser:     2
         🅾 (OBV) Multiplier: 1
| 26 | 🥊 (SAR) Stop and Reverse
         🥊 (SAR) Source:     close
         🥊 (SAR) High:        1.8
         🥊 (SAR) Mid:         1.6
         🥊 (SAR) Low:        1.6
         🥊 (SAR) Diviser:     2
         🥊 (SAR) Multiplier: 1
| 27 | 🛡️ (DSR) Dynamic Support and Resistance
         🛡️ (DSR) Source D:       close
         🛡️ (DSR) Source R:       high
         🛡️ (DSR) Source S:       low
         🛡️ (DSR) Momentum R: 0
         🛡️ (DSR) Momentum S: 2
         🛡️ (DSR) Diviser:          2
         🛡️ (DSR) Multiplier:      1
| 28 | 🔊 (VD) Volume Directional
         🔊 (VD) Type:          SMA
         🔊 (VD) Period:        68
         🔊 (VD) Momentum: 3.8
         🔊 (VD) Diviser:       2
         🔊 (VD) Multiplier:    1
| 29 | 🧰 (RSI) Relative Momentum Index
         🧰 (RSI) Type UP:        EMA
         🧰 (RSI) Type DOWN:   EMA
         🧰 (RSI) Source:          close
         🧰 (RSI) Period:           29
         🧰 (RSI) Smoothing:     22
         🧰 (RSI) Momentum R: 64
         🧰 (RSI) Momentum S: 142
         🧰 (RSI) Diviser:          2
         🧰 (RSI) Multiplier:      1
| 30 | 🎯 (TP) Take Profit %
         🎯 (TP) Take Profit: false
         🎯 (TP) %:              2.2
         🎯 (TP) Color:         #42bda8
         🎯 (TP) Linewidth:  1
| 31 | 🛑 (SL) Stop Loss %
         🛑 (SL) Stop Loss:  false
         🛑 (SL) %:             2.7
         🛑 (SL) Color:        #801922
         🛑 (SL) Linewidth: 1
| 32 | 🤖 Automation : Discord | Telegram | Twitter | Wundertrading | 3commas | Zignaly | Aleeert | Alertatron | Uniswap-v3
         🤖 Automation Selected : Discord
| 33 | 🤖 Discord
         🔗 Link Discord:            
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Discord ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Discord ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Discord ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Discord ▬ Exit Short:   🔒Titan Pro👽
| 34 | 🤖 Telegram
         🔗 Link Telegram:          
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Telegram ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Telegram ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Telegram ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Telegram ▬ Exit Short:   🔒Titan Pro👽
| 35 | 🤖 Twitter
         🔗 Link Twitter:            
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Twitter ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Twitter ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Twitter ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Twitter ▬ Exit Short:   🔒Titan Pro👽
| 36 | 🤖 Wundertrading : Binance | Bitmex | Bybit | KuCoin | Deribit | OKX | Coinbase | Huobi | Bitfinex | Bitget
         🔗 Link Wundertrading:  
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Wundertrading ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Wundertrading ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Wundertrading ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Wundertrading ▬ Exit Short:   🔒Titan Pro👽
| 37 | 🤖 3commas : Binance | Bybit | OKX | Bitfinex | Coinbase | Deribit | Bitmex | Bittrex | Bitstamp | Gate.io | Kraken | Gemini | Huobi | KuCoin
         🔗 Link 3commas:          
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 3commas ▬ Enter Long:  🔒Titan Pro👽
         📱💻 3commas ▬ Exit Long:    🔒Titan Pro👽
         📱💻 3commas ▬ Enter Short: 🔒Titan Pro👽
         📱💻 3commas ▬ Exit Short:   🔒Titan Pro👽
| 38 | 🤖 Zignaly : Binance | Ascendex | Bitmex | Kucoin | VCCE
         🔗 Link Zignaly:             
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         🤖 Type Automation:        Profit Sharing
         🤖 Type Provider:             Webook
         🔑 Key:                         🔒Titan Pro👽
         🤖 pair:                         BTCUSDTP
         🤖 exchange:                  binance
         🤖 exchangeAccountType: futures
         🤖 orderType:                 market
         🚀 leverage:                   1x
          % positionSizePercentage: 100 %
         💸 positionSizeQuote:       10000 $
         🆔 signalId:                     @Signal1234
| 39 | 🤖 Aleeert : Binance
         🔗 Link Aleeert:             
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Aleeert ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Aleeert ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Aleeert ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Aleeert ▬ Exit Short:   🔒Titan Pro👽
| 40 | 🤖 Alertatron : Binance | Bybit | Deribit | Bitmex
         🔗 Link Alertatron:         
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Alertatron ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Alertatron ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Alertatron ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Alertatron ▬ Exit Short:   🔒Titan Pro👽
| 41 | 🤖 Uniswap-v3
         🔗 Link Alertatron:         
         🔗 Link 📚 Automation: 🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Enter Long:  🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Exit Long:    🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Enter Short: 🔒Titan Pro👽
         📱💻 Uniswap-v3 ▬ Exit Short:   🔒Titan Pro👽
| 42 | 🧲🤖 Copy-Trading : Zignaly | Wundertrading
         🔗 Link 📚 Copy-Trading:                  🔒Titan Pro👽
         🧲🤖 Copy-Trading ▬ Zignaly:           🔒Titan Pro👽
         🧲🤖 Copy-Trading ▬ Wundertrading: 🔒Titan Pro👽
| 43 | ♻️ ® Don't Repaint!
         ♻️ This Strategy does not Repaint!:                  ® Signs Do not repaint❕
         ♻️ This is a Real Strategy!:                              Quality : ® Titan Investimentos
         📋️️ Get more information about Repainting here: 
| 44 | 🔒 Copyright ©️
         🔒 Copyright ©️: Copyright © 2023-2024 All rights reserved, ® Titan Investimentos
         🔒 Copyright ©️: ® Titan Investimentos
         🔒 Copyright ©️: Unique and Exclusive Strategy. All rights reserved
| 45 | 🏛️ Be a Titan Members
         🏛️ Titan Pro        👽 Version with ✔️100% Integrated Automation 🤖 and 📚 Automation Tutorials ✔️100% available at: (PDF/VIDEO) 
         🏛️ Titan Affiliate 🛸 (Subscription Sale) 🔥 Receive 50% commission                                                                                            
| 46 | ⏱ Time Left
         Time Left Titan Demo 🐄: ⏱♾            | ⏱ : ♾ Titan Demo 🐄 Version with ❌non-integrated automation 🤖 and 📚 Tutorials for automation ❌not available
         Time Left Titan Pro     👽: 🔒Titan Pro👽 | ⏱ : Pro Plans: 30 Days, 90 Days, 12 Months, 24 Months. (👽 Pro 🅼 Monthly, 👽 Pro 🆀 Quarterly, 👽 Pro🅰 Annual, 👽 Pro👾Two Years)
| 47 | Nº Active Users
 
         Nº Active Subscribers Titan Pro 👽: 5️⃣6️⃣ | 1✔️ 5✔️ 10✔️ 100❌ 1K❌ 10K❌ 50K❌ 100K❌ 1M❌ 10M❌ 100M❌ : ⏱ Active Users is updated every 24 hours (Check on indicator)
         Nº Active Affiliates    Titan Aff 🛸: 6️⃣     | 1✔️ 5✔️ 10❌ 100❌ 1K❌ 10K❌  50K❌ 100K❌ 1M❌ 10M❌ 100M❌ : ⏱ Active Users is updated every 24 hours (Check on indicator)
 2️⃣7️⃣ : 📊 PERFORMANCE : 🆑 Conservative 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: 🆑 Conservative: 🎯 TP=2.7 % | 🛑 SL=2.7 %
• 📆All years: 🆑 Conservative: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit:
🟢 + 1669.89 %
💲   + 166989.43 USD
Total Close Trades:
⚪️ 369
Percent  Profitable:
🟡 64.77 %
Profit Factor:
🟢 2.314
DrawDrown Maximum:
🔴 -24.82 %
💲   -10221.43 USD
Avg Trade:
💲   + 452.55 USD
✔️ Trades Winning: 239
❌ Trades Losing:   130
                                                                  
✔️ Average Gross Win: + 12.31 %
❌ Average Gross Loss: - 9.78 %
                                                                                                        
✔️ Maximum Consecutive Wins:   9
❌ Maximum Consecutive Losses: 6
%  Average Gain Annual:   499.33 %
%  Average Gain Monthly: 41.61 %
%  Average Gain Weekly:  9.6 %
%  Average Gain Day:      1.37 %
💲  Average Gain Annual:   49933 $
💲  Average Gain Monthly: 4161 $
💲  Average Gain Weekly:  960 $
💲  Average Gain Day:      137 $ 
                                                              
• 📆 Year: 2020: 🆑 Conservative: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: 🆑 Conservative: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: 🆑 Conservative: 🚀 Leverage 1️⃣x
 2️⃣8️⃣ : 📊 PERFORMANCE : Ⓜ️ Moderate 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: Ⓜ️ Moderate: 🎯 TP=2.8 % | 🛑 SL=2.7 %
• 📆 All years: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit: 
🟢 + 1472.04 %
💲   + 147199.89 USD
Total Close Trades:
⚪️ 362
Percent  Profitable:
🟡 63.26 %
Profit Factor:
🟢 2.192
DrawDrown Maximum:
🔴 -22.69 %
💲   -9269.33 USD
Avg Trade:
💲   + 406.63 USD
                                                                                                     
✔️ Trades Winning: 229
❌ Trades Losing   : 133
                                                                  
✔️ Average Gross Win: + 11.82 %
❌ Average Gross Loss: - 9.29 %
                                                                                                        
✔️ Maximum Consecutive Wins:   9
❌ Maximum Consecutive Losses: 8
%  Average Gain Annual:  440.15 %
%  Average Gain Monthly: 36.68 %
%  Average Gain Weekly:  8.46 %
%  Average Gain Day:      1.21 %
💲  Average Gain Annual:  44015 $
💲  Average Gain Monthly: 3668 $
💲  Average Gain Weekly:  846 $
💲  Average Gain Day:      121 $
                     
                                         
• 📆 Year: 2020: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: Ⓜ️ Moderate: 🚀 Leverage 1️⃣x
 2️⃣9️⃣ : 📊 PERFORMANCE : 🅰 Aggressive 
📊 Exchange:         Binance
📊 Pair:                BINANCE:  BTCUSDTPERP
📊 TimeFrame:      4h
📊 Initial Capital:   10000 $
📊 Order Type:       % equity
📊 Size Per Order: 100 %
📊 Commission:     0.03 %
📊 Pyramid:          1
• ⚠️ Risk Profile: 🅰 Aggressive: 🎯 TP=1.6 % | 🛑 SL=6.9 %
• 📆 All years: 🅰 Aggressive: 🚀 Leverage 1️⃣x
📆 Start: September 23, 2019
📆 End:   January 11, 2023
📅 Days: 1221
📅 Bars:  7325
Net Profit:
🟢 + 989.38 %
💲   + 98938.38 USD
Total Close Trades:
⚪️ 380
Percent  Profitable:
🟢 84.47 %
Profit Factor:
🟢 2.156
DrawDrown Maximum:
🔴 -17.88 %
💲   -9182.84 USD
Avg Trade:
💲   + 260.36 USD
                                                                                                                 
✔️ Trades Winning: 321
❌ Trades Losing:   59
                                                                  
✔️ Average Gross Win: + 5.75 %
❌ Average Gross Loss: - 14.51 %
                                                                                                        
✔️ Maximum Consecutive Wins:   21
❌ Maximum Consecutive Losses: 6
%  Average Gain Annual:  295.84 %
%  Average Gain Monthly: 24.65 %
%  Average Gain Weekly:  5.69 %
%  Average Gain Day:      0.81 %
💲  Average Gain Annual:  29584 $
💲  Average Gain Monthly: 2465 $
💲  Average Gain Weekly:  569 $
💲  Average Gain Day:      81 $
• 📆 Year: 2020: 🅰 Aggressive: 🚀 Leverage 1️⃣x
• 📆 Year: 2021: 🅰 Aggressive: 🚀 Leverage 1️⃣x
• 📆 Year: 2022: 🅰 Aggressive: 🚀 Leverage 1️⃣x
 3️⃣0️⃣ : 🛠️ Roadmap 
 🛠️• 14/ 01 /2023 : Titan THEMIS Launch 
 🛠️• Updates January/2023 : 
    •  📚 Tutorials for Automation 🤖 already Available : ✔️ 
    • ✔️ Discord
    • ✔️ Wundertrading
    • ✔️ Zignaly
    •  📚 Tutorials for Automation 🤖 In Preparation : ⭕ 
    • ⭕ Telegram
    • ⭕ Twitter
    • ⭕ 3comnas
    • ⭕ Aleeert
    • ⭕ Alertatron
    • ⭕ Uniswap-v3
    • ⭕ Copy-Trading
 🛠️• Updates February/2023 : 
    • 📰 Launch of advertising material for Titan Affiliates 🛸
    • 🛍️🎥🖼️📊 (Sales Page/VSL/Videos/Creative/Infographics)
 🛠️• 28/05/2023 :  Titan THEMIS  update  ▬  Version 2.7 
 🛠️• 28/05/2023 :   BOT BOB release  ▬ Version 1.0
    • (Native Titan THEMIS Automation - Through BOT BOB, a bot for automation of signals, indicators and strategies of TradingView, of own code ▬ in validation.
    • BOT BOB
       Automation/Connection :
    • API - For Centralized Brokers.
    • Smart Contracts - Wallet Web - For Decentralized Brokers.
    • This way users can automate any indicator or strategy of TradingView and Titan in a decentralized, secure and simplified way.
    • Without having the need to use 'third party services' for automating TradingView indicators and strategies like the ones available above.
 🛠️• 28/05/2023 :  Release ▬ Titan  Culture Guide  📝
 3️⃣1️⃣ : 🧻 Notes ❕ 
🧻 • Note ❕ The "Demo 🐄" version, ❌does not have 'integrated automation', to automate the signals of this strategy and enjoy a fully automated system, you need to have access to the Pro version with '100% integrated automation' and all the tutorials for automation available. Become a Titan Pro 👽
🧻 • Note ❕ You will also need to be a "Pro User or higher on Tradingview", to be able to use the webhook feature available only for 'paid' profiles on the platform.
With the webhook feature it is possible to send the signals of this strategy to almost anywhere, in our case to centralized or decentralized brokerages, also to popular messaging services such as: Discord, Telegram or Twiter.
 3️⃣2️⃣ : 🚨 Disclaimer ❕❗ 
🚨 • Disclaimer ❕❕ Past positive result and performance of a system does not guarantee its positive result and performance for the future!
🚨 • Disclaimer ❗❗❗ When using this strategy: Titan Investments is totally Exempt from any claim of liability for losses. The responsibility on the management of your funds is solely yours. This is a very high risk/volatility market! Understand your place in the market.
 3️⃣3️⃣ : ♻️ ® No Repaint 
This Strategy does not Repaint! This is a real strategy!
 3️⃣4️⃣ : 🔒 Copyright ©️ 
Copyright © 2022-2023 All rights reserved, ® Titan Investimentos
 3️⃣5️⃣ : 👏 Acknowledgments 
I want to start this message in thanks to TradingView and all the Pinescript community for all the 'magic' created here, a unique ecosystem! rich and healthy, a fertile soil, a 'new world' of possibilities, for a complete deepening and improvement of our best personal skills.
I leave here my immense thanks to the whole community: Tradingview, Pinecoders, Wizards and Moderators.
I was not born Rich .
Thanks to TradingView and pinescript and all its transformation.
I could develop myself and the best of me and the best of my skills.
And consequently build wealth and patrimony.
Gratitude.
One more story for the  infinite book !
If you were born  poor  you were born to be  rich !
Raising🔼 the level and raising🔼 the ruler! 📏
My work is my 'debauchery'! Do better! 💐🌹
Soul of a first-timer! Creativity Exudes! 🦄
This is the manifestation of God's magic in me. This is the best of me. 🧙
You will copy me, I know. So you owe me. 💋
My mission here is to raise the consciousness and self-esteem of all Titans and Titanids! Welcome! 🧘 🏛️
 The only way to accomplish great work is to do what you love ! Before I learned to program I was wasting my life!
 Death  is the  best   creation  of  life .
Now you are the  new , but in the not so distant  future  you will gradually become the  old . Here I stay forever!
Playing the game like an Athlete! 🖼️ Enjoy and Enjoy 🍷 🗿
In honor of: BOB ☆
1 name, 3 letters, 3 possibilities, and if read backwards it's the same thing, a palindrome. ☘
Gratitude to the oracles that have enabled me the 'luck' to get this far: Dal&Ni&Fer
 3️⃣6️⃣ : 👮 House Rules : 📺 TradingView 
 House Rules :  This publication and strategy follows all TradingView house guidelines and rules:
📺 TradingView House Rules: www.tradingview.com
📺 Script publication rules:    www.tradingview.com
📺 Vendor requirements:      www.tradingview.com
📺 Links/References rules:    www.tradingview.com
 3️⃣7️⃣ : 🏛️ Become a Titan Pro member 👽 
🟩 Titan Pro 👽 🟩         
 3️⃣8️⃣ : 🏛️ Be a member Titan Aff 🛸 
🟥 Titan Affiliate 🛸 🟥  
Option Buying Strategy By Raj PandyaThis strategy is designed for intraday trading on BankNifty using a powerful confluence of trend, structure and momentum. It combines the 9-period Exponential Moving Average (EMA) with Daily Traditional Pivot Points to identify high-probability breakout trades.
A Long (CALL) signal is generated when price crosses and closes above both the 9 EMA and the Daily Pivot Point (PP), confirming upward trend strength. A Short (PUT) signal triggers when price crosses and closes below the 9 EMA and PP, signaling downside momentum. To reduce false signals, the strategy uses RSI with a moving average filter to ensure momentum aligns with price action.
Risk management is built-in with previous candle high/low stop-loss, a fixed 50-point target, and an automatic trailing stop system to protect profits on trending days. This helps capitalize on strong momentum while managing risk effectively.
This strategy works best on the 5-minute timeframe and is optimized for BankNifty futures/options. It aims to capture clean directional moves around key intraday value levels used by institutional traders.
TradingView.To Strategy Template (with Dyanmic Alerts)Hello traders,
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of TradingView.TO alerts, sparing users the time and effort of mastering the TradingView.TO syntax and manually create alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via TradingView.TO bot.
 IMPORTANT NOTES 
TradingView.TO is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, Metatrader 4/5, ...) for automating trading.
Many traders don't know how to create TradingView.TO dynamically-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create TradingView.TO alerts dynamically.
 TRADINGVIEW ALERTS 
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for BTC/USDT on the 5 minutes chart, 1 alert for BTC/USDT on the 15-minute chart (assuming you want your bot to trade the BTC/USDT on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) TradingView.TO uses webhook technology - setting a webhook URL from the alerts notifications tab is required.
 KEY FEATURES 
 I) Modular Indicator Connection 
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
 
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10,    "ATR Length", minval = 1)
factor =    input.float(3.0, "Factor",     minval = 0.01, step = 0.01)
  = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend =    plot(direction < 0 ? supertrend : na, "Up Trend",   color = color.green, style = plot.style_linebr)
downTrend =  plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red,   style = plot.style_linebr)
fill(bodyMiddle, upTrend,   color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red,   90), fillgaps = false)
buy  = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION //////// 
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION //////// 
 Important Notes 
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
 
 II) BOT Risk Management: 
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
 III) Order Types and Position Sizing 
- Choose between market or limit orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
 IV) Advanced Take-Profit and Stop-Loss Options 
- Choose to set your SL/TP in either USD or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in USD for “risk-free” trades.
V) Miscellaneous:
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
 VI) Logger 
The TradingView.TO commands are logged in the TradingView logger.
You'll find more information about it in this  TradingView blog post .
 WHY YOU MIGHT NEED THIS TEMPLATE 
1) Transform your indicator into a TradingView.TO trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for TradingView.TO.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
REQUIREMENTS
* Make sure you have your TradingView.TO account
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
 BACKTEST RESULTS FROM THIS POST 
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with TradingView.TO.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
ProfitView Strategy TemplateHello traders,
This script took me a full week of coding/testing, sweat, and tears - and I’m too nice as I’m giving it for free to the community.
If you're tired of manual trading and looking for a solid strategy template to pair with your indicators, look no further.
This Pine Script v5 strategy template is engineered for maximum customization and risk management.
Best part?
This Pine Script v5 template facilitates the dynamic construction of ProfitView alerts, sparing users the time and effort of mastering the ProfitView syntax and manually creating alert commands.
This powerful tool gives much power to those who don't know how to code in Pinescript and want to automate their indicators' signals via the ProfitView Chrome extension.
 IMPORTANT NOTES 
ProfitView is a trading bot software that forwards TradingView alerts to your brokers (examples: Binance, Oanda, Coinbase, Bybit, etc.) for automating trading.
Many traders don't know how to dynamically create ProfitView-compatible alerts using the data from their TradingView scripts.
Traders using trading bots want their alerts to reflect the stop-loss/take-profit/trailing-stop/stop-loss to break options from your script and then create the orders accordingly.
This script showcases how to create ProfitView alerts dynamically.
 TRADINGVIEW ALERTS 
1) You'll have to create one alert per asset X timeframe = 1 chart.
Example: 1 alert for EUR/USD on the 5 minutes chart, 1 alert for EUR/USD on the 15-minute chart (assuming you want your bot to trade the EUR/USD on the 5 and 15-minute timeframes)
2) Select the Order fills and alert() function calls condition
3) For each alert, the alert message is pre-configured with the text below
{{strategy.order.alert_message}}
Please leave it as it is.
It's a TradingView native variable that will fetch the alert text messages built by the script.
4) ProfitView doesn't use webhook technology, so setting a webhook URL from the alerts notifications tab is unnecessary.
 KEY FEATURES 
 I) Modular Indicator Connection 
* plug your existing indicator into the template.
* Only two lines of code are needed for full compatibility.
Step 1: Create your connector
Adapt your indicator with only 2 lines of code and then connect it to this strategy template.
To do so:
1) Find in your indicator where the conditions print the long/buy and short/sell signals.
2) Create an additional plot as below
I'm giving an example with a Two moving averages cross.
Please replicate the same methodology for your indicator, whether a MACD , ZigZag, Pivots , higher-highs, lower-lows or whatever indicator with clear buy and sell conditions.
 
//@version=5
indicator("Supertrend", overlay = true, timeframe = "", timeframe_gaps = true)
atrPeriod = input.int(10,    "ATR Length", minval = 1)
factor =    input.float(3.0, "Factor",     minval = 0.01, step = 0.01)
  = ta.supertrend(factor, atrPeriod)
supertrend := barstate.isfirst ? na : supertrend
bodyMiddle = plot(barstate.isfirst ? na : (open + close) / 2, display = display.none)
upTrend =    plot(direction < 0 ? supertrend : na, "Up Trend",   color = color.green, style = plot.style_linebr)
downTrend =  plot(direction < 0 ? na : supertrend, "Down Trend", color = color.red,   style = plot.style_linebr)
fill(bodyMiddle, upTrend,   color.new(color.green, 90), fillgaps = false)
fill(bodyMiddle, downTrend, color.new(color.red,   90), fillgaps = false)
buy  = ta.crossunder(direction, 0)
sell = ta.crossunder(direction, 0)
//////// CONNECTOR SECTION //////// 
Signal = buy ? 1 : sell ? -1 : 0
plot(Signal, title = "Signal", display = display.data_window)
//////// CONNECTOR SECTION //////// 
 Important Notes 
🔥 The Strategy Template expects the value to be exactly 1 for the bullish signal and -1 for the bearish signal
Now, you can connect your indicator to the Strategy Template using the method below or that one.
Step 2: Connect the connector
1) Add your updated indicator to a TradingView chart
2) Add the Strategy Template as well to the SAME chart
3) Open the Strategy Template settings, and in the Data Source field, select your 🔌Connector🔌 (which comes from your indicator)
Note it doesn’t have to be named 🔌Connector🔌 - you can name it as you want - however, I recommend an explicit name you can easily remember.
From then, you should start seeing the signals and plenty of other stuff on your chart.
🔥 Note that whenever you update your indicator values, the strategy statistics and visuals on your chart will update in real-time
 
 II) BOT Risk Management: 
- Max Drawdown:
Mode: Select whether the max drawdown is calculated in percentage (%) or USD.
Value: If the max drawdown reaches this specified value, set a value to halt the bot.
- Max Consecutive Days:
Use Max Consecutive Days BOT Halt: Enable/Disable halting the bot if the max consecutive losing days value is reached.
- Max Consecutive Days: Set the maximum number of consecutive losing days allowed before halting the bot.
- Max Losing Streak:
Use Max Losing Streak: Enable/Disable a feature to prevent the bot from taking too many losses in a row.
- Max Losing Streak Length: Set the maximum length of a losing streak allowed.
Margin Call:
- Use Margin Call: Enable/Disable a feature to exit when a specified percentage away from a margin call to prevent it.
Margin Call (%): Set the percentage value to trigger this feature.
- Close BOT Total Loss:
Use Close BOT Total Loss: Enable/Disable a feature to close all trades and halt the bot if the total loss is reached.
- Total Loss ($): Set the total loss value in USD to trigger this feature.
Intraday BOT Risk Management:
- Intraday Losses:
Use Intraday Losses BOT Halt: Enable/Disable halting the bot on reaching specified intraday losses.
Mode: Select whether the intraday loss is calculated in percentage (%) or USD.
- Max Intraday Losses (%): Set the value for maximum intraday losses.
Limit Intraday Trades:
- Use Limit Intraday Trades: Enable/Disable a feature to limit the number of intraday trades.
- Max Intraday Trades: Set the maximum number of intraday trades allowed.
Restart Intraday EA:
- Use Restart Intraday EA: Enable/Disable a feature to restart the bot at the first bar of the next day if it has been stopped with an intraday risk management safeguard.
 III) Order Types and Position Sizing 
- Choose between market, limit, or stop orders.
- Set your position size directly in the template.
Please use the position size from the “Inputs” and not the “Properties” tab.
I know it's redundant. - the template needs this value from the "Inputs" tab to build the alerts, and the Backtester needs it from the "Properties" tab.
 IV) Advanced Take-Profit and Stop-Loss Options 
- Choose to set your SL/TP in either pips or percentages.
- Option for multiple take-profit levels and trailing stop losses.
- Move your stop loss to break even +/- offset in pips for “risk-free” trades.
 V) Miscellaneous 
Retry order openings if they fail.
Order Types:
Select and specify order type and price settings.
Position Size:
Define the type and size of positions.
Leverage:
Leverage settings, including margin type and hedge mode.
Session:
Limit trades to specific sessions.
Dates:
Limit trades to a specific date range.
Trades Direction:
Direction: Specify the market direction for opening positions.
 VI) Notifications (Telegram/Discord/Email/IFTTT/Twilio/SMS) 
Customize notifications sent to Telegram, Discord, Email, IFTTT, Twilio, and ProfitView Logger.
 VII) Logger 
The ProfitView commands are logged in the TradingView logger.
You'll find more information about it in this  TradingView blog post .
 WHY YOU MIGHT NEED THIS TEMPLATE 
1) Transform your indicator into a ProfitView trading bot more easily than before
Connect your indicator to the template
Create your alerts
Set your EA settings
2) Save Time
Auto-generated alert messages for ProfitView.
I tested them all and checked with the support team what could/couldn’t be done.
3) Be in Control
Manage your trading risks with advanced features.
4) Customizable
Fits various trading styles and asset classes.
 REQUIREMENTS 
* Make sure you have your ProfitView account and do the settings correctly in your Chrome extension. If you don't know how to do it, read the documentation + ask for help in the ProfitView Discord support channel.
* If there is any issue with the template, ask me in the comments section - I’ll answer quickly.
 BACKTEST RESULTS FROM THIS POST 
1) I connected this strategy template to a dummy Supertrend script.
I could have selected any other indicator or concept for this script post.
I wanted to share an example of how you can quickly upgrade your strategy, making it compatible with ProfitView.
2) The backtest results aren't relevant for this educational script publication.
I used realistic backtesting data but didn't look too much into optimizing the results, as this isn't the point of why I'm publishing this script.
This strategy is a template to be connected to any indicator - the sky is the limit. :)
3) This template is made to take 1 trade per direction at any given time.
Pyramiding is set to 1 on TradingView.
The strategy default settings are:
* Initial Capital: 100000 USD
* Position Size: 1%
* Commission Percent: 0.075%
* Slippage: 1 tick
* No margin/leverage used
Best regards,
Dave
Quantum Reversal Engine [ApexLegion]Quantum Reversal Engine  
 STRATEGY OVERVIEW 
This strategy is constructed using 5 custom analytical filters that analyze different market dimensions - trend structure, momentum expansion, volume confirmation, price action patterns, and reversal detection - with results processed through a multi-component scoring calculation that determines signal generation and position management decisions.
 Why These Custom Filters Were Independently Developed: 
This strategy employs five custom-developed analytical filters:
1. Apex Momentum Core (AMC) - Custom oscillator with volatility-scaled deviation calculation
Standard oscillators lag momentum shifts by 2-3 bars. Custom calculation designed for momentum analysis
2. Apex Wick Trap (AWT) - Wick dominance analysis for trap detection
Existing wick analysis tools don't quantify trap conditions. Uses specific ratios for wick dominance detection
3. Apex Volume Pulse (AVP) - Volume surge validation with participation confirmation
Volume indicators typically use simple averages. Uses surge multipliers with participation validation
4. Apex TrendGuard (ATG) - Angle-based trend detection with volatility band integration
EMA slope calculations often produce false signals. Uses angle analysis with volatility bands for confirmation
5. Quantum Composite Filter (QCF) - Multi-component scoring and signal generation system
Composite scoring designed to filter noise by requiring multiple confirmations before signal activation.
Each filter represents mathematical calculations designed to address specific analytical requirements.
 Framework Operation:  The strategy functions as a scoring framework where each filter contributes weighted points based on market conditions. Entry signals are generated when minimum threshold scores are met. Exit management operates through a three-tier system with continued signal strength evaluation determining position holds versus closures at each TP level.
Integration Challenge: The core difficulty was creating a scoring system where five independent filters could work together without generating conflicting signals. This required backtesting to determine effective weight distributions.
Custom Filter Development:
Each of the five filters represents analytical approaches developed through testing and validation:
Integration Validation: Each filter underwent individual testing before integration. The composite scoring system required validation to verify that filters complement rather than conflict with each other, resulting in a cohesive analytical framework that was tested during the development period.
These filters represent custom-developed components created specifically for this strategy, with each component addressing different analytical requirements through testing and parameter adjustment.
Programming Features:
Multi-timeframe data handling with backup systems
Performance optimization techniques
Error handling for live trading scenarios
Parameter adaptation based on market conditions
Strategy Features:
Uses multi-filter confirmation approach
Adapts position holding based on continued signal strength
Includes analysis tools for trade review and optimization
Ongoing Development: The strategy was developed through testing and validation processes during the creation period.
 COMPONENT EXPLANATION 
EMA System
Uses 8 exponential moving averages (7, 14, 21, 30, 50, 90, 120, 200 periods) for trend identification. Primary signals come from 8/21 EMA crossovers, while longer EMAs provide structural context. EMA 1-4 determine short-term structure, EMA 5-8 provide long-term trend confirmation.
Apex Momentum Core (AMC)
Built custom oscillator mathematics after testing dozens of momentum calculation methods. Final algorithm uses price deviation from EMA baseline with volatility scaling to reduce lag while maintaining accuracy across different market conditions.
Custom momentum oscillator using price deviation from EMA baseline:
 apxCI = 100 * (source - emaBase) / (sensitivity * sqrt(deviation + 1))
fastLine = EMA(apxCI, smoothing)
signalLine = SMA(fastLine, 4) 
Signals generate when fastLine crosses signalLine at +50/-50 thresholds. 
This identifies momentum expansion before traditional oscillators.
Apex Volume Pulse (AVP)
Created volume surge analysis that goes beyond simple averages. Extensive testing determined 1.3x multiplier with participation validation provides reliable confirmation while filtering false volume spikes.
Compares current volume to 21-period moving average. 
Requires 1.3x average volume for signal confirmation. This filters out low-volume moves during quiet periods and confirms breakouts with actual participation.
Apex Wick Trap (AWT)
Developed proprietary wick trap detection through analysis of failed breakout patterns. Tested various ratio combinations before settling on 60% wick dominance + 20% body limit as effective trap identification parameters.
Analyzes candle structure to identify failed breakouts:
 candleRange = math.max(high - low, 0.00001)
candleBody = math.abs(close - open)
bodyRatio = candleBody / candleRange
upperWick = high - math.max(open, close)
lowerWick = math.min(open, close) - low
upperWickRatio = upperWick / candleRange
lowerWickRatio = lowerWick / candleRange
trapWickLong = showAWT and lowerWickRatio > minWickDom and bodyRatio < bodyToRangeLimit and close > open
trapWickShort = showAWT and upperWickRatio > minWickDom and bodyRatio < bodyToRangeLimit and close < open This catches reversals after fake breakouts.
Apex TrendGuard (ATG)
Built angle-based trend detection after standard EMA crossovers proved insufficient. Combined slope analysis with volatility bands through iterative testing to eliminate false trend signals.
EMA slope analysis with volatility bands:
Fast EMA (21) vs Slow EMA (55) for trend direction
Angle calculation: atan(fast - slow) * 180 / π
ATR bands (1.75x multiplier) for breakout confirmation
Minimum 25° angle for strong trend classification
 Core Algorithm Framework 
1. Composite Signal Generation 
 
calculateCompositeSignals() =>
    // Component Conditions 
    structSignalLong = trapWickLong
    structSignalShort = trapWickShort  
    momentumLong = amcBuySignal
    momentumShort = amcSellSignal
    volumeSpike = volume > volAvg_AVP * volMult_AVP
    priceStrength_Long = close > open and close > close 
    priceStrength_Short = close < open and close < close 
    
    rsiMfiComboValue = (ta.rsi(close, 14) + ta.mfi(close, 14)) / 2
    reversalTrigger_Long = ta.crossover(rsiMfiComboValue, 50)
    reversalTrigger_Short = ta.crossunder(rsiMfiComboValue, 50)
    isEMACrossUp = ta.crossover(emaFast_ATG, emaSlow_ATG)   
    isEMACrossDown = ta.crossunder(emaFast_ATG, emaSlow_ATG)
    // Enhanced Composite Score Calculation  
    scoreBuy = 0.0
    scoreBuy += structSignalLong ? scoreStruct : 0.0
    scoreBuy += momentumLong ? scoreMomentum : 0.0
    scoreBuy += flashSignal ? weightFlash : 0.0
    scoreBuy += blinkSignal ? weightBlink : 0.0
    scoreBuy += volumeSpike_AVP ? scoreVolume : 0.0
    scoreBuy += priceStrength_Long ? scorePriceAction : 0.0
    scoreBuy += reversalTrigger_Long ? scoreReversal : 0.0
    scoreBuy += emaAlignment_Bull ? weightTrendAlign : 0.0
    scoreBuy += strongUpTrend ? weightTrendAlign : 0.0
    scoreBuy += highRisk_Long ? -1.2 : 0.0
    scoreBuy += signalGreenDot ? 1.0 : 0.0
    scoreBuy += isAMCUp ? 0.8 : 0.0
    scoreBuy += isVssBuy ? 1.5 : 0.0
    scoreBuy += isEMACrossUp ? 1.0 : 0.0
    scoreBuy += signalRedX ? -1.0 : 0.0
                
    scoreSell = 0.0
    scoreSell += structSignalShort ? scoreStruct : 0.0
    scoreSell += momentumShort ? scoreMomentum : 0.0
    scoreSell += flashSignal ? weightFlash : 0.0
    scoreSell += blinkSignal ? weightBlink : 0.0
    scoreSell += volumeSpike_AVP ? scoreVolume : 0.0
    scoreSell += priceStrength_Short ? scorePriceAction : 0.0
    scoreSell += reversalTrigger_Short ? scoreReversal : 0.0
    scoreSell += emaAlignment_Bear ? weightTrendAlign : 0.0
    scoreSell += strongDownTrend ? weightTrendAlign : 0.0
    scoreSell += highRisk_Short ? -1.2 : 0.0
    scoreSell += signalRedX ? 1.0 : 0.0
    scoreSell += isAMCDown ? 0.8 : 0.0
    scoreSell += isVssSell ? 1.5 : 0.0
    scoreSell += isEMACrossDown ? 1.0 : 0.0
    scoreSell += signalGreenDot ? -1.0 : 0.0
    
    compositeBuySignal = enableComposite and scoreBuy >= thresholdCompositeBuy 
    compositeSellSignal = enableComposite and scoreSell >= thresholdCompositeSell
    
    if compositeBuySignal and compositeSellSignal
        compositeBuySignal := false
        compositeSellSignal := false
     
  = calculateCompositeSignals()
// Final Entry Signals
entryCompositeBuySignal = compositeBuySignal and ta.rising(emaFast_ATG, 2) 
entryCompositeSellSignal = compositeSellSignal and ta.falling(emaFast_ATG, 2) 
Calculates weighted scores from independent modules and activates signals only when threshold requirements are met.
2. Smart Exit Hold Evaluation System
 evaluateSmartHold() =>
    compositeBuyRecentCount = 0
    compositeSellRecentCount = 0
    
    for i = 0 to signalLookbackBars - 1
        compositeBuyRecentCount += compositeBuySignal  ? 1 : 0
        compositeSellRecentCount += compositeSellSignal  ? 1 : 0
    
    avgVolume = ta.sma(volume, 20)
    volumeSpike = volume > avgVolume * volMultiplier
    
    // MTF Bull/Bear conditions
    mtf_bull = mtf_emaFast_final > mtf_emaSlow_final
    mtf_bear = mtf_emaFast_final < mtf_emaSlow_final
    emaBackupDivergence = math.abs(mtf_emaFast_backup - mtf_emaSlow_backup) / mtf_emaSlow_backup
    emaBackupStrong = emaBackupDivergence > 0.008 
    mtfConflict_Long = inLong and mtf_bear and emaBackupStrong 
    mtfConflict_Short = inShort and mtf_bull and emaBackupStrong
    // Layer 1: ATR-Based Dynamic Threshold (Market Volatility Intelligence)
    atr_raw = ta.atr(atrLen)
    atrValue = na(atr_raw) ? close * 0.02 : atr_raw
    atrRatio = atrValue / close
    dynamicThreshold = atrRatio > 0.02 ? 1.0 : (atrRatio > 0.01 ? 1.5 : 2.8)
    // Layer 2: ROI-Conditional Time Intelligence (Selective Pressure)
    timeMultiplier_Long = realROI >= 0 ? 1.0 :  // Profitable positions: No time pressure
                     holdTimer_Long <= signalLookbackBars ? 1.0 :           // Loss positions 1-8 bars: Base
                     holdTimer_Long <= signalLookbackBars * 2 ? 1.1 :       // Loss positions 9-16 bars: +10% stricter  
                     1.3                                                     // Loss positions 17+ bars: +30% stricter
    timeMultiplier_Short = realROI >= 0 ? 1.0 :  // Profitable positions: No time pressure
                      holdTimer_Short <= signalLookbackBars ? 1.0 :         // Loss positions 1-8 bars: Base
                      holdTimer_Short <= signalLookbackBars * 2 ? 1.1 :     // Loss positions 9-16 bars: +10% stricter
                      1.3                                                    // Loss positions 17+ bars: +30% stricter
    // Dual-Layer Threshold Calculation
    baseThreshold_Long = mtfConflict_Long ? dynamicThreshold + 1.0 : dynamicThreshold
    baseThreshold_Short = mtfConflict_Short ? dynamicThreshold + 1.0 : dynamicThreshold
    
    timeAdjustedThreshold_Long = baseThreshold_Long * timeMultiplier_Long
    timeAdjustedThreshold_Short = baseThreshold_Short * timeMultiplier_Short
    // Final Smart Hold Decision with Dual-Layer Intelligence
    smartHold_Long = not mtfConflict_Long and smartScoreLong >= timeAdjustedThreshold_Long and compositeBuyRecentCount >= signalMinCount
    smartHold_Short = not mtfConflict_Short and smartScoreShort >= timeAdjustedThreshold_Short and compositeSellRecentCount >= signalMinCount
                        
     
  = evaluateSmartHold() 
Evaluates whether to hold positions past TP1/TP2/TP3 levels based on continued signal strength, volume confirmation, and multi-timeframe trend alignment
 HOW TO USE THE STRATEGY 
Step 1: Initial Setup
Apply strategy to your preferred timeframe (backtested on 15M)
Enable "Use Heikin-Ashi Base" for smoother signals in volatile markets
"Show EMA Lines" and "Show Ichimoku Cloud" are enabled for visual context
Set default quantities to match your risk management (5% equity default)
Step 2: Signal Recognition
  
Visual Signal Guide:
Visual Signal Guide - Complete Reference:
🔶 Red Diamond: Bearish momentum breakdown - short reversal signal
🔷 Blue Diamond: Strong bullish momentum - long reversal signal
🔵 Blue Dot: Volume-confirmed directional move - trend continuation
🟢 Green Dot: Bullish EMA crossover - trend reversal confirmation
🟠 Orange X: Oversold reversal setup - counter-trend opportunity
❌ Red X: Bearish EMA breakdown - trend reversal warning
✡ Star Uprising: Strong bullish convergence
💥 Ultra Entry: Ultra-rapid downward momentum acceleration
▲ VSS Long: Velocity-based bullish momentum confirmation
▼ VSS Short: Velocity-based bearish momentum confirmation
  
Step 3: Entry Execution
For Long Positions:
1. ✅ EMA1 crossed above EMA2 exactly 3 bars ago  [ta.crossover(ema1,ema2) ]
2. ✅ Current EMA structure: EMA1 > EMA2 (maintained)
3. ✅ Composite score ≥ 5.0 points (6.5+ for 5-minute timeframes)
4. ✅ Cooldown period completed (no recent stop losses)
5. ✅ Volume spike confirmation (green dot/blue dot signals)
6. ✅ Bullish candle closes above EMA structure
For Short Positions:
1. ✅ EMA1 crossed below EMA2 exactly 3 bars ago  [ta.crossunder(ema1,ema2) ]
2. ✅ Current EMA structure: EMA1 < EMA2 (maintained)
3. ✅ Composite score ≥ 5.4 points (7.0+ for 5-minute timeframes)
4. ✅ Cooldown period completed (no recent stop losses)
5. ✅ Momentum breakdown (red diamond/red X signals)
6. ✅ Bearish candle closes below EMA structure
🎯 Critical Timing Note: The strategy requires EMA crossover to have occurred 3 bars prior to entry, not at the current bar. This attempts to avoid premature entries and may improve signal reliability.
Step 4: Reading Market Context
EMA Ribbon Interpretation:
All EMAs ascending = Strong uptrend context
EMAs 1-3 above EMAs 4-8 = Bullish structure
Tight EMA spacing = Low volatility/consolidation
Wide EMA spacing = High volatility/trending
Ichimoku Cloud Context:
Price above cloud = Bullish environment
Price below cloud = Bearish environment
Cloud color intensity = Momentum strength
Thick cloud = Strong support/resistance
 THE SMART EXIT GRID SYSTEM 
Smart Exit Grid Approach: 
The Smart Exit Grid uses dynamic hold evaluation that continuously analyzes market conditions after position entry. This differs from traditional fixed profit targets by adapting exit timing based on real-time signal strength.
How Smart Exit Grid System Works
The system operates through three evaluation phases:
Smart Score Calculation:
The smart score calculation aggregates 22 signal components in real-time, combining reversal warnings, continuation signals, trend alignment indicators, EMA structural analysis, and risk penalties into a numerical representation of market conditions. MTF analysis provides additional confirmation as a separate validation layer.
Signal Stack Management:
The per-tick signal accumulation system monitors 22 active signal types with MTF providing trend validation and conflict detection as a separate confirmation layer.
Take Profit Progression:
Smart Exit Activation:
The QRE system activates Smart Exit Grid immediately upon position entry. When strategy.entry() executes, the system initializes monitoring systems designed to track position progress.
Upon position opening, holdTimer begins counting, establishing the foundation for subsequent decisions. The Smart Exit Grid starts accumulating signals from entry, with all 22 signal components beginning real-time tracking when the trade opens.
The system operates on continuous evaluation where smartScoreLong and smartScoreShort calculate from the first tick after entry. QRE's approach is designed to capture market structure changes, trend deteriorations, or signal pattern shifts that can trigger protective exits even before the first take profit level is reached.
This activation creates a proactive position management framework. The 8-candle sliding window starts from entry, meaning that if market conditions change rapidly after entry - due to news events, liquidity shifts, or technical changes - the system can respond within the configured lookback period.
TP Markers as Reference Points:
The TP1, TP2, and TP3 levels function as reference points rather than mandatory exit triggers. When longTP1Hit or shortTP1Hit conditions activate, they serve as profit confirmation markers that inform the Smart Exit algorithm about achieved reward levels, but don't automatically initiate position closure.
These TP markers enhance the Smart Exit decision matrix by providing profit context to ongoing signal evaluation. The system recognizes when positions have achieved target returns, but the actual exit decision remains governed by continuous smart score evaluation and signal stack analysis.
TP2 Reached: Enhanced Monitoring
TP2 represents significant profit capture with additional monitoring features:
This approach is designed to help avoid premature profit-taking during trending conditions. If TP2 is reached but smartScoreLong remains above the dynamic threshold and the 8-candle sliding window shows persistent signals, the position continues holding. If market structure deteriorates before reaching TP2, the Smart Exit can trigger closure based on signal analysis.
The visual TP circles that appear when levels are reached serve as performance tracking tools, allowing users to see how frequently entries achieve various profit levels while understanding that actual exit timing depends on market structure analysis.
Risk Management Systems:
Operating independently from the Smart Exit Grid are two risk management systems: the Trap Wick Detection Protocol and the Stop Loss Mechanism. These systems maintain override authority over other exit logic.
The Trap Wick System monitors for conditionBearTrapExit during long positions and conditionBullTrapExit during short positions. When detected, these conditions trigger position closure with state reset, bypassing Smart Exit evaluations. This system recognizes that certain candlestick patterns may indicate reversal risk.
Volatility Exit Monitoring: The strategy monitors for isStrongBearCandle combined with conditionBearTrapExit, recognizing when market structure may be shifting.
Volume Validation: Before exiting on volatility, the strategy requires volume confirmation: volume > ta.sma(volume, 20) * 1.8. This is designed to filter exits on weak, low-volume movements.
The Stop Loss Mechanism operates through multiple triggers including traditional price-based stops (longSLHit, shortSLHit) and early exit conditions based on smart score deterioration combined with negative ROI. The early exit logic activates when smartScoreLong < 1.0 or smartScoreShort < 1.0 while realROI < -0.9%.
These risk management systems are designed so that risk scenarios can trigger protective closure with state reset across all 22 signal counters, TP tracking variables, and smart exit states.
This architecture - Smart Exit activation, TP markers as navigation tools, and independent risk management - creates a position management system that adapts to market conditions while maintaining risk discipline through dedicated protection protocols.
TP3 Reached: Enhanced Protection
Once TP3 is hit, the strategy shifts into enhanced monitoring:
EMA Structure Monitoring: isEMAStructureDown becomes a primary exit trigger
MTF Alignment: The higher timeframe receives increased consideration
Wick Trap Priority: conditionBearTrapExit becomes an immediate exit signal
Approach Differences:
Traditional Fixed Exits:
Exit at predetermined levels regardless of market conditions
May exit during trend continuation
May exit before trend completion
Limited adaptation to changing volatility
Smart Exit Grid Approach:
Adaptive timing based on signal conditions
Exits when supporting signals weaken
Multi-timeframe validation for trend confirmation
Volume confirmation requirements for holds
Structural monitoring for trend analysis
Dynamic ATR-Based Smart Score Threshold System
Market Volatility Adaptive Scoring
 // Real-time ATR Analysis
atr_raw = ta.atr(atrLen)
atrValue = na(atr_raw) ? close * 0.02 : atr_raw
atrRatio = atrValue / close
// Three-Tier Dynamic Threshold Matrix
dynamicThreshold = atrRatio > 0.02 ? 1.0 :     // High volatility: Lower threshold
(atrRatio > 0.01 ? 1.5 :     // Medium volatility: Standard
2.8)                        // Low volatility: Higher threshold 
The market volatility adaptive scoring calculates real-time ATR with a 2% fallback for new markets. The atrRatio represents the relationship between current volatility and price, creating a foundation for threshold adjustment.
The three-tier dynamic threshold matrix responds to market conditions by adjusting requirements based on volatility levels: lowering thresholds during high volatility periods above 2% ATR ratio to 1.0 points, maintaining standard requirements at 1.5 points for medium volatility between 1-2%, and raising standards to 2.8 points during low volatility periods below 1%.
Profit-Loss Adaptive Management:
The system applies different evaluation criteria based on position performance:
Winning Positions (realROI ≥ 0%):
→ timeMultiplier = 1.0 (No additional pressure)
→ Maintains base threshold requirements
→ Allows natural progression to TP2/TP3 levels
Losing Positions (realROI < 0%):
→ Progressive time pressure activated
→ Increasingly strict requirements over time
→ Faster decision-making on underperforming trades
ROI-Adaptive Smart Hold Decision Process:
The strategy uses a profit-loss adaptive system:
Winning Position Management (ROI ≥ 0%):
✅ Standard threshold requirements maintained
✅ No additional time-based pressure applied
✅ Allows positions to progress toward TP2/TP3 levels
✅ timeMultiplier remains at 1.0 regardless of hold duration
Losing Position Management (ROI < 0%):
⚠️ Time-based threshold adjustments activated
⚠️ Progressive increase in required signal strength over time
⚠️ Earlier exit evaluation on underperforming positions
⚠️ timeMultiplier increases from 1.0 → 1.1 → 1.3 based on hold duration
Real-Time Monitoring:
Monitor Analysis Table → "Smart" filter → "Score" vs "Dynamic Threshold"
Winning positions: Evaluation based on signal strength deterioration only
Losing positions: Evaluation considers both signal strength and progressive time adjustments
Breakeven positions (0% ROI): Treated as winning positions - no time adjustments
This approach differentiates between winning and losing positions in the hold evaluation process, requiring higher signal thresholds for extended holding of losing positions while maintaining standard requirements for winning ones.
ROI-Conditional Decision Matrix Examples:
Scenario 1 - Winning Position in Any Market:
Position ROI: +0.8% → timeMultiplier = 1.0 (regardless of hold time)
ATR Medium (1.2%) → dynamicThreshold = 1.5
Final Threshold = 1.5 × 1.0 = 1.5 points ✅ Position continues
Scenario 2 - Losing Position, Extended Hold:
Position ROI: -0.5% → Time pressure activated
Hold Time: 20 bars → timeMultiplier = 1.3
ATR Low (0.8%) → dynamicThreshold = 2.8
Final Threshold = 2.8 × 1.3 = 3.64 points ⚡ Enhanced requirements
Scenario 3 - Fresh Losing Position:
Position ROI: -0.3% → Time pressure activated
Hold Time: 5 bars → timeMultiplier = 1.0 (still early)
ATR High (2.1%) → dynamicThreshold = 1.0
Final Threshold = 1.0 × 1.0 = 1.0 points 📊 Recovery opportunity
Scenario 4 - Breakeven Position:
Position ROI: 0.0% → timeMultiplier = 1.0 (no pressure)
Hold Time: 15 bars → No time penalty applied
Final Threshold = dynamicThreshold only ⚖️ Neutral treatment
🔄8-Candle Sliding Window Signal Rotation System
Composite Signal Counting Mechanism
 // Dynamic Lookback Window (configurable: default 8)
signalLookbackBars = input.int(8, "Composite Lookback Bars", minval=1, maxval=50)
// Rolling Signal Analysis
compositeBuyRecentCount = 0
compositeSellRecentCount = 0
for i = 0 to signalLookbackBars - 1
compositeBuyRecentCount += compositeBuySignal  ? 1 : 0
compositeSellRecentCount += compositeSellSignal  ? 1 : 0 
Candle Flow Example (8-bar window):
                  →  
✓     ✓   ✗   ✓   ✗   ✓   ✗   ✓    🗑️
New Signal Count = 5/8 signals in window
Threshold Check: 5 ≥ signalMinCount (2) = HOLD CONFIRMED
Signal Decay & Refresh Mechanism
 // Signal Persistence Tracking
if compositeBuyRecentCount >= signalMinCount
smartHold_Long = true
else
smartHold_Long = false 
The composite signal counting operates through a configurable sliding window. The system maintains rolling counters that scan backward through the specified number of candles.
During each evaluation cycle, the algorithm iterates through historical bars, incrementing counters when composite signals are detected. This creates a dynamic signal persistence measurement where recent signal density determines holding decisions.
The sliding window rotation functions like a moving conveyor belt where new signals enter while the oldest signals drop off. For example, in an 8-bar window, if 5 out of 8 recent candles showed composite buy signals, and the minimum required count is 2, the system confirms the hold condition. As new bars form, the window slides forward, potentially changing the signal count and triggering exit conditions when signal density falls below the threshold.
Signal decay and refresh occur continuously where smartHold_Long remains true only when compositeBuyRecentCount exceeds signalMinCount. When recent signal density drops below the minimum requirement, the system switches to exit mode.
Advanced Signal Stack Management - 22-Signal Real-Time Evaluation
 // Long Position Signal Stacking (calc_on_every_tick=true)
if inLong
// Primary Reversal Signals
if signalRedDiamond: signalCountRedDiamond += 1    // -0.5 points
if signalStarUprising: signalCountStarUprising += 1   // +1.5 points
if entryUltraShort: signalCountUltra += 1                // -1.0 points
// Trend Confirmation Signals
if strongUpTrend: trendUpCount_Long += 1               // +1.5 points
if emaAlignment_Bull: bullAlignCount_Long += 1         // +1.0 points
// Risk Assessment Signals
if highRisk_Long: riskCount_Long += 1                    // -1.5 points
if topZone: tzoneCount_Long += 1                         // -0.5 points 
The per-tick signal accumulation system operates with calc_on_every_tick=true for real-time responsiveness. During long positions, the system monitors primary reversal signals where Red Diamond signals subtract 0.5 points as reversal warnings, Star Uprising adds 1.5 points for continuation signals, and Ultra Short signals deduct 1.0 points as counter-trend warnings.
Trend confirmation signals provide weighted scoring where strongUpTrend adds 1.5 points for aligned momentum, emaAlignment_Bull contributes 1.0 point for structural support, and various EMA-based confirmations contribute to the overall score. Risk assessment signals apply negative weighting where highRisk_Long situations subtract 1.5 points, topZone conditions deduct 0.5 points, and other risk factors create defensive scoring adjustments.
The smart score calculation aggregates all 22 components in real-time, combining reversal warnings, continuation signals, trend alignment indicators, EMA structural analysis, and risk penalties into a numerical representation of market conditions. This score updates continuously, providing the foundation for hold-or-exit decisions.
  
 MULTI-TIMEFRAME (MTF) SYSTEM 
MTF Data Collection
The strategy requests higher timeframe data (default 30-minute) for trend confirmation:
  = request.security(syminfo.tickerid, mtfTimeframe,  , lookahead=barmerge.lookahead_off, gaps=barmerge.gaps_off) 
MTF Watchtower System - Implementation Logic
The system employs a timeframe discrimination protocol where currentTFInMinutes is compared against a 30-minute threshold. This creates different operational behavior between timeframes:
📊 Timeframe Testing Results:
30M+ charts: Full MTF confirmation → Tested with full features
15M charts: Local EMA + adjusted parameters → Standard testing baseline
5M charts: Local EMA only → Requires parameter adjustment
1M charts: High noise → Limited testing conducted
When the chart timeframe is 30 minutes or above, the strategy activates useMTF = true and requests external MTF data through request.security(). For timeframes below 30 minutes, including your 5-minute setup, the system deliberately uses local EMA calculations to avoid MTF lag and data inconsistencies.
The triple-layer data sourcing architecture works as follows: timeframes from 1 minute to 29 minutes rely on chart-based EMA calculations for immediate responsiveness. Timeframes of 30 minutes and above utilize MTF data through the security function, with a backup system that doubles the EMA length (emaLen * 2) if MTF data fails. When MTF data is unavailable or invalid, the system falls back to local EMA as the final safety net.
Data validation occurs through a pipeline where mtf_dataValid checks not only for non-null values but also verifies that EMA values are positive above zero. The system tracks data sources through mtf_dataSource which displays "MTF Data" for successful external requests, "Backup EMA" for failed MTF with backup system active, or "Chart EMA" for local calculations.
🔄 MTF Smart Score Caching & Recheck System
 // Cache Update Decision Logic
mtfSmartIntervalSec = input.int(300, "Smart Grid Recheck Interval (sec)")  // 5-minute cache
canRecheckSmartScore = na(timenow) ? false :
(na(lastCheckTime) or (timenow - lastCheckTime) > mtfSmartIntervalSec * 1000)
// Cache Management
if canRecheckSmartScore
lastCheckTime := timenow
cachedSmartScoreLong := smartScoreLong      // Store current calculation
cachedSmartScoreShort := smartScoreShort 
The performance-optimized caching system addresses the computational intensity of continuous MTF analysis through intelligent interval management. The mtfSmartIntervalSec parameter, defaulting to 300 seconds (5 minutes), determines cache refresh frequency. The system evaluates canRecheckSmartScore by comparing current time against lastCheckTime plus the configured interval.
When cache updates trigger, the system stores current calculations in cachedSmartScoreLong and cachedSmartScoreShort, creating stable reference points that reduce excessive MTF requests. This cache management balances computational efficiency with analytical accuracy.
The cache versus real-time hybrid system creates a multi-layered decision matrix where immediate signals update every tick for responsive market reaction, cached MTF scores refresh every 5 minutes for stability filtering, dynamic thresholds recalculate every bar for volatility adaptation, and sliding window analysis updates every bar for trend persistence validation.
This architecture balances real-time signal detection with multi-timeframe strategic validation, creating adaptive trading intelligence that responds immediately to market changes while maintaining strategic stability through cached analysis and volatility-adjusted decision thresholds.
 ⚡The Execution Section Deep Dive 
The execution section represents the culmination of all previous systems – where analysis transforms into action.
🚪 Entry Execution: The Gateway Protocol
Primary Entry Validation:
Entry isn't just about seeing a signal – it's about passing through multiple security checkpoints, each designed to filter out low-quality opportunities.
Stage 1: Signal Confirmation
entryCompositeBuySignal must be TRUE for longs
entryCompositeSellSignal must be TRUE for shorts
Stage 2: Enhanced Entry Validation
The strategy employs an "OR" logic system that recognizes different types of market opportunities:
Path A - Trend Reversal Entry:
When emaTrendReversal_Long triggers, it indicates the market structure is shifting in favor of the trade direction. This isn't just about a single EMA crossing – it represents a change in market momentum that experienced traders recognize as potential high-probability setups.
Path B - Momentum Breakout Entry:
The strongBullMomentum condition is where QRE identifies accelerating market conditions:
Criteria:
EMA1 rising for 3+ candles AND
EMA2 rising for 2+ candles AND
Close > 10-period high
This combination captures those explosive moves where the market doesn't just trend – it accelerates, creating momentum-driven opportunities.
Path C - Recovery Entry:
When previous exit states are clean (no recent stop losses), the strategy permits entry based purely on signal strength. This pathway is designed to help avoid the strategy becoming overly cautious after successful trades.
🛡️ The Priority Exit Matrix: When Rules Collide
Not all exit signals are created equal. QRE uses a strict hierarchy that is designed to avoid conflicting signals from causing hesitation:
Priority Level 1 - Exception Exits (Immediate Action):
Condition: TP3 reached AND Wick Trap detected
Action: Immediate exit regardless of other signals
Rationale: Historical analysis suggests wick traps at TP3 may indicate potential reversals
Priority Level 2 - Structural Breakdown:
Condition: TP3 active AND EMA structure deteriorating AND Smart Score insufficient
Logic: isEMAStructureDown AND NOT smartHold_Long
This represents the strategy recognizing that the underlying market structure that justified the trade is failing. It's like a building inspector identifying structural issues – you don't wait for additional confirmation.
Priority Level 3 - Enhanced Volatility Exits:
Conditions: TP2 active AND Strong counter-candle AND Wick trap AND Volume spike
Logic: Multiple confirmation required to reduce false exits
Priority Level 4 - Standard Smart Score Exits:
Condition: Any TP level active AND smartHold evaluates to FALSE
This is the bread-and-butter exit logic where signal deterioration triggers exit
⚖️ Stop Loss Management: Risk Control Protocol
Dual Stop Loss System:
QRE provides two stop loss modes that users can select based on their preference:
Fixed Mode (Default - useAdaptiveSL = false):
Uses predetermined percentage levels regardless of market volatility:
- Long SL = entryPrice × (1 - fixedRiskP - slipBuffer)
- Short SL = entryPrice × (1 + fixedRiskP + slipBuffer)
- Default: 0.6% risk + 0.3% slippage buffer = 0.9% total stop
- Consistent and predictable stop loss levels
- Recommended for users who prefer stable risk parameters
Adaptive Mode (Optional - useAdaptiveSL = true):
Dynamic system that adjusts stop loss based on market volatility:
- Base Calculation uses ATR (Average True Range)
- Long SL = entryPrice × (1 - (ATR × atrMultSL) / entryPrice - slipBuffer)
- Short SL = entryPrice × (1 + (ATR × atrMultSL) / entryPrice + slipBuffer)
- Automatically widens stops during high volatility periods
- Tightens stops during low volatility periods
- Advanced users can enable for volatility-adaptive risk management
Trend Multiplier Enhancement (Both Modes):
When strongUpTrend is detected for long positions, the stop loss receives 1.5x breathing room. Strong trends often have deeper retracements before continuing. This is designed to help avoid the strategy being shaken out of active trades by normal market noise.
Mode Selection Guidance:
- New Users: Start with Fixed Mode for predictable risk levels
- Experienced Users: Consider Adaptive Mode for volatility-responsive stops
- Volatile Markets: Adaptive Mode may provide better stop placement
- Stable Markets: Fixed Mode often sufficient for consistent risk management
Early Exit Conditions:
Beyond traditional stop losses, QRE implements "smart stops" that trigger before price-based stops:
Early Long Exit: (smartScoreLong < 1.0 OR prev5BearCandles) AND realROI < -0.9%
🔄 State Management: The Memory System
Complete State Reset Protocol:
When a position closes, QRE doesn't just wipe the slate clean – it performs a methodical reset:
TP State Cleanup:
All Boolean flags: tp1/tp2/tp3HitBefore → FALSE
All Reached flags: tp1/tp2/tp3Reached → FALSE
All Active flags: tp1/tp2/tp3HoldActive → FALSE
Signal Counter Reset:
Every one of the 22 signal counters returns to zero. 
This is designed to avoid signal "ghosting" where old signals influence new trades.
Memory Preservation:
While operational states reset, certain information is preserved for learning:
killReasonLong/Short: Why did this trade end?
lastExitWasTP1/TP2/TP3: What was the exit quality?
reEntryCount: How many consecutive re-entries have occurred?
🔄 Re-Entry Logic: The Comeback System
Re-Entry Conditions Matrix:
QRE implements a re-entry system that recognizes not all exits are created equal:
TP-Based Re-Entry (Enabled):
Criteria: Previous exit was TP1, TP2, or TP3
Cooldown: Minimal or bypassed entirely
Logic: Target-based exits indicate potentially viable market conditions
EMA-Based Re-Entry (Conditional):
Criteria: Previous exit was EMA-based (structural change)
Requirements: Must wait for EMA confirmation in new direction
Minimum Wait: 5 candles
Advanced Re-Entry Features:
When adjustReEntryTargets is enabled, the strategy becomes more aggressive with re-entries:
Target Adjustment: TP1 multiplied by reEntryTP1Mult (default 2.0)
Stop Adjustment: SL multiplied by reEntrySLMult (default 1.5)
Logic: If we're confident enough to re-enter, we should be confident enough to hold for bigger moves
Performance Tracking: Strategy tracks re-entry win rate, average ROI, and total performance separately from initial entries for optimization analysis.
📊 Exit Reason Analytics: Learning from Every Trade
Kill Reason Tracking:
Every exit is categorized and stored:
"TP3 Exit–Wick Trap": Exit at target level with wick pattern detection
"Smart Exit–EMA Down": Structural breakdown exit
"Smart Exit–Volatility": Volatility-based protection exit
"Exit Post-TP1/TP2/TP3": Standard smart exit progression
"Long SL Exit" / "Short SL Exit": Stop loss exits
Performance Differentiation:
The strategy tracks performance by exit type, allowing for continuous analysis:
TP-based exits: Achieved target levels, analyze for pattern improvement
EMA-based exits: Mixed results, analyze for pattern improvement
SL-based exits: Learning opportunities, adjust entry criteria
Volatility exits: Protective measures, monitor performance
🎛️ Trailing Stop Implementation: 
Conditional Trailing Activation:
Activation Criteria: Position profitable beyond trailingStartPct AND
(TP hold active OR re-entry trade)
Dynamic Trailing Logic:
Unlike simple trailing stops, QRE's implementation considers market context:
Trending Markets: Wider trail offsets to avoid whipsaws
Volatile Markets: Tighter offsets to protect gains
Re-Entry Trades: Enhanced trailing to maximize second-chance opportunities
Return-to-Entry Protection:
When deactivateOnReturn is enabled, the strategy will close positions that return to entry level after being profitable. This is designed to help avoid the frustration of watching profitable trades turn into losers.
🧠 How It All Works Together
The beauty of QRE lies not in any single component, but in how everything integrates:
The Entry Decision: Multiple pathways are designed to help identify opportunities while maintaining filtering standards.
The Progression System: Each TP level unlocks new protection features, like achieving ranks in a video game.
The Exit Matrix: Prioritized decision-making aims to reduce analysis paralysis while providing appropriate responses to different market conditions.
The Memory System: Learning from each trade while preventing contamination between separate opportunities.
The Re-Entry Logic: Re-entry system that balances opportunity with risk management.
This creates a trading system where entry conditions filter for quality, progression systems adapt to changing market conditions, exit priorities handle conflicting signals intelligently, memory systems learn from each trade cycle, and re-entry logic maximizes opportunities while managing risk exposure.
📊 ANALYSIS TABLE INTERPRETATION -  
  
⚙️ Enabling Analysis Mode
Navigate to strategy settings → "Testing & Analysis" → Enable "Show Analysis Table". The Analysis Table displays different information based on the selected test filter and provides real-time insight into all strategy components, helping users understand current market conditions, position status, and system decision-making processes.
📋 Filter Mode Interpretations
"All" Mode (Default View):
Composite Section:
Buy Score: Aggregated strength from all 22 bullish signals (threshold 5.0+ triggers entry consideration)
Sell Score: Aggregated strength from all 22 bearish signals (threshold 5.4+ triggers entry consideration)
APEX Filters:
ATG Trend: Shows current trend direction analysis
Indicates whether momentum filters are aligned for directional bias
ReEntry Section:
Most Recent Exit: Displays exit type and timeframe since last position closure
Status: Shows if ReEntry system is Ready/Waiting/Disabled
Count: Current re-entry attempts versus maximum allowed attempts
Position Section (When Active):
Status: Current position state (LONG/SHORT/FLAT)
ROI: Dual calculation showing Custom vs Real ROI percentages
Entry Price: Original position entry level
Current Price: Live market price for comparison
TP Tracking: Progress toward profit targets
"Smart" Filter (Critical for Active Positions):
Smart Exit Section:
Hold Timer: Time elapsed since position opened (bar-based counting)
Status: Whether Smart Exit Grid is Enabled/Disabled
Score: Current smart score calculation from 22-component matrix
Dynamic Threshold: ATR-based minimum score required for holding
Final Threshold: Time and ROI-adjusted threshold actually used for decisions
Score Check: Pass/Fail based on Score vs Final Threshold comparison
Smart Hold: Current hold decision status
Final Hold: Final recommendation based on all factors
🎯 Advanced Smart Exit Debugging - ROI & Time-Based Threshold System
Understanding the Multi-Layer Threshold System:
Layer 1: Dynamic Threshold (ATR-Based)
atrRatio = ATR / close
dynamicThreshold = atrRatio > 0.02 ? 1.0 :  // High volatility: Lower threshold
                   (atrRatio > 0.01 ? 1.5 :          // Medium volatility: Standard
                    2.8)                                  // Low volatility: Higher threshold
Layer 2: Time Multiplier (ROI & Duration-Based)
Winning Positions (ROI ≥ 0%):
→ timeMultiplier = 1.0 (No time pressure, regardless of hold duration)
Losing Positions (ROI < 0%):
→ holdTimer ≤ 8 bars: timeMultiplier = 1.0 (Early stage, standard requirements)
→ holdTimer 9-16 bars: timeMultiplier = 1.1 (10% stricter requirements)
→ holdTimer 17+ bars: timeMultiplier = 1.3 (30% stricter requirements)
Layer 3: Final Threshold Calculation
finalThreshold = dynamicThreshold × timeMultiplier
Examples:
- Winning Position: 2.8 × 1.0 = 2.8 (Always standard)
- Losing Position (Early): 2.8 × 1.0 = 2.8 (Same as winning initially)
- Losing Position (Extended): 2.8 × 1.3 = 3.64 (Much stricter)
Real-Time Debugging Display:
Smart Exit Section shows:
Score: 3.5 → Current smartScoreLong/Short value
Dynamic Threshold: 2.8 → Base ATR-calculated threshold
Final Threshold: 3.64 (ATR×1.3) → Actual threshold used for decisions
Score Check: FAIL (3.5 vs 3.64) → Pass/Fail based on final comparison
Final Hold: NO HOLD → Actual system decision
Position Status Indicators:
Winner + Early: ATR×1.0 (No pressure)
Winner + Extended: ATR×1.0 (No pressure - winners can run indefinitely)
Loser + Early: ATR×1.0 (Recovery opportunity)
Loser + Extended: ATR×1.1 or ATR×1.3 (Increasing pressure to exit)
MTF Section:
Data Source: Shows whether using MTF Data/EMA Backup/Local EMA
Timeframe: Configured watchtower timeframe setting
Data Valid: Confirms successful MTF data retrieval status
Trend Signal: Higher timeframe directional bias analysis
Close Price: MTF price data availability confirmation
"Composite" Filter:
Composite Section:
Buy Score: Real-time weighted scoring from multiple indicators
Sell Score: Opposing directional signal strength
Threshold: Minimum scores required for signal activation
Components:
Flash/Blink: Momentum acceleration indicators (F = Flash active, B = Blink active)
Individual filter contributions showing which specific signals are firing
"ReEntry" Filter:
ReEntry System:
System: Shows if re-entry feature is Enabled/Disabled
Eligibility: Conditions for new entries in each direction
Performance: Success metrics of re-entry attempts when enabled
  
🎯 Key Status Indicators
Status Column Symbols:
✓ = Condition met / System active / Signal valid
✗ = Condition not met / System inactive / No signal
⏳ = Cooldown active (waiting period)
✅ = Ready state / Good condition
🔄 = Processing / Transitioning state
🔍 Critical Reading Guidelines
For Active Positions - Smart Exit Priority Reading:
1. First Check Position Type:
ROI ≥ 0% = Winning Position (Standard requirements)
ROI < 0% = Losing Position (Progressive requirements)
2. Check Hold Duration:
Early Stage (≤8 bars): Standard multiplier regardless of ROI
Extended Stage (9-16 bars): Slight pressure on losing positions
Long Stage (17+ bars): Strong pressure on losing positions
3. Score vs Final Threshold Analysis:
Score ≥ Final Threshold = HOLD (Continue position)
Score < Final Threshold = EXIT (Close position)
Watch for timeMultiplier changes as position duration increases
4. Understanding "Why No Hold?"
Common scenarios when Score Check shows FAIL:
Losing position held too long (timeMultiplier increased to 1.1 or 1.3)
Low volatility period (dynamic threshold raised to 2.8)
Signal deterioration (smart score dropped below required level)
MTF conflict (higher timeframe opposing position direction)
For Entry Signal Analysis:
Composite Score Reading: Signal strength relative to threshold requirements
Component Analysis: Individual filter contributions to overall score
EMA Structure: Confirm 3-bar crossover requirement met
Cooldown Status: Ensure sufficient time passed since last exit
For ReEntry Opportunities (when enabled):
System Status: Availability and eligibility for re-engagement
Exit Type Analysis: TP-based exits enable immediate re-entry, SL-based exits require cooldown
Condition Monitoring: Requirements for potential re-entry signals
Debugging Common Issues:
Issue: "Score is high but no hold?"
→ Check Final Threshold vs Score (not Dynamic Threshold)
→ Losing position may have increased timeMultiplier
→ Extended hold duration applying pressure
Issue: "Why different thresholds for same score?"
→ Position ROI status affects multiplier
→ Time elapsed since entry affects multiplier
→ Market volatility affects base threshold
Issue: "MTF conflicts with local signals?"
→ Higher timeframe trend opposing position
→ System designed to exit on MTF conflicts
→ Check MTF Data Valid status
⚡ Performance Optimization Notes
For Better Performance:
Analysis table updates may impact performance on some devices
Use specific filters rather than "All" mode for focused monitoring
Consider disabling during live trading for optimal chart performance
Enable only when needed for debugging or analysis
Strategic Usage:
Monitor "Smart" filter when positions are active for exit timing decisions
Use "Composite" filter during setup phases for signal strength analysis
Reference "ReEntry" filter after position closures for re-engagement opportunities
Track Final Threshold changes to understand exit pressure evolution
Advanced Debugging Workflow:
Position Entry Analysis:
Check Composite score vs threshold
Verify EMA crossover timing (3 bars prior)
Confirm cooldown completion
Hold Decision Monitoring:
Track Score vs Final Threshold progression
Monitor timeMultiplier changes over time
Watch for MTF conflicts
Exit Timing Analysis:
Identify which threshold layer caused exit
Track performance by exit type
Analyze re-entry eligibility
This analysis system provides transparency into strategy decision-making processes, allowing users to understand how signals are generated and positions are managed according to the programmed logic during various market conditions and position states.
 SIGNAL TYPES AND CHARACTERISTICS 
🔥 Core Momentum Signals
Flash Signal
Calculation: ta.rma(math.abs(close - close ), 5) > ta.sma(math.abs(close - close ), 7)
Purpose: Detects sudden price acceleration using smoothed momentum comparison
Characteristics: Triggers when recent price movement exceeds historical average movement
Usage: Primary momentum confirmation across multiple composite calculations
Weight: 1.3 points in composite scoring
Blink Signal
Calculation: math.abs(ta.change(close, 1)) > ta.sma(math.abs(ta.change(close, 1)), 5)
Purpose: Identifies immediate price velocity spikes
Characteristics: More sensitive than Flash, captures single-bar momentum bursts
Usage: Secondary momentum confirmation, often paired with Flash
Weight: 1.3 points in composite scoring
⚡ Advanced Composite Signals
Apex Pulse Signal
Calculation: apexAngleValue > 30 or apexAngleValue < -30
Purpose: Detects extreme EMA angle momentum
Characteristics: Identifies when trend angle exceeds ±30 degrees
Usage: Confirms directional momentum strength in trend-following scenarios
Pressure Surge Signal
Calculation: volSpike_AVP and strongTrendUp_ATG
Purpose: Combines volume expansion with trend confirmation
Characteristics: Requires both volume spike and strong uptrend simultaneously
Usage: bullish signal for trend continuation
Shift Wick Signal
Calculation: ta.crossunder(ema1, ema2) and isWickTrapDetected and directionFlip
Purpose: Detects bearish reversal with wick trap confirmation
Characteristics: Combines EMA crossunder with upper wick dominance and directional flip
Usage: Reversal signal for trend change identification
🛡️ Trap Exit Protection Signals
Bear Trap Exit
Calculation: isUpperWickTrap and isBearEngulfNow
Conditions: Previous bullish candle with 80%+ upper wick, followed by current bearish engulfing
Purpose: Emergency exit signal for long positions
Priority: Highest - overrides all other hold conditions
Action: Immediate position closure with full state reset
Bull Trap Exit
Calculation: isLowerWickTrap and isBullEngulfNow
Conditions: Previous bearish candle with 80%+ lower wick, followed by current bullish engulfing
Purpose: Emergency exit signal for short positions
Priority: Highest - overrides all other hold conditions
Action: Immediate position closure with full state reset
📊 Technical Analysis Foundation Signals
RSI-MFI Hybrid System
Base Calculation: (ta.rsi(close, 14) + ta.mfi(close, 14)) / 2
Oversold Threshold: < 35
Overbought Threshold: > 65
Weak Condition: < 35 and declining
Strong Condition: > 65 and rising
Usage: Momentum confirmation and reversal identification
ADX-DMI Trend Classification
Strong Up Trend: (adx > 25 and diplus > diminus and (diplus - diminus) > 5) or (ema1 > ema2 and ema2 > ema3 and ta.rising(ema2, 3))
Strong Down Trend: (adx > 20 and diminus > diplus - 5) or (ema1 < ema2 and ta.falling(ema1, 3))
Trend Weakening: adx < adx  and adx  < adx 
Usage: Primary trend direction confirmation
Bollinger Band Squeeze Detection
Calculation: bbWidth < ta.lowest(bbWidth, 20) * 1.2
Purpose: Identifies low volatility periods before breakouts
Usage: Entry filter - avoids trades during consolidation
🎨 Visual Signal Indicators
Red X Signal
Calculation: isBearCandle and ta.crossunder(ema1, ema2)
Visual: Red X above price
Purpose: Bearish EMA crossunder with confirming candle
Composite Weight: +1.0 for short positions, -1.0 for long positions
Characteristics: Simple but effective trend change indicator
Green Dot Signal
Calculation: isBullCandle and ta.crossover(ema1, ema2)
Visual: Green dot below price
Purpose: Bullish EMA crossover with confirming candle
Composite Weight: +1.0 for long positions, -1.0 for short positions
Characteristics: Entry confirmation for trend-following strategies
Blue Diamond Signal
Trigger Conditions: amcBuySignal and score >= 4
Scoring Components: 11 different technical conditions
Key Requirements: AMC bullish + momentum rise + EMA expansion + volume confirmation
Visual: Blue diamond below price
Purpose: Bullish reversal or continuation signal
Characteristics: Multi-factor confirmation requiring 4+ technical alignments
Red Diamond Signal
Trigger Conditions: amcSellSignal and score >= 5
Scoring Components: 11 different technical conditions (stricter than Blue Diamond)
Key Requirements: AMC bearish + momentum crash + EMA compression + volume decline
Visual: Red diamond above price
Purpose: Potential bearish reversal or continuation signal
Characteristics: Requires higher threshold (5 vs 4) for more selective triggering
🔵 Specialized Detection Signals
Blue Dot Signal
Calculation: volumePulse and isCandleStrong and volIsHigh
Requirements: Volume > 2.0x MA, strong candle body > 35% of range, volume MA > 55
Purpose: Volume-confirmed momentum signal
Visual: Blue dot above price
Characteristics: Volume-centric signal for high-liquidity environments
Orange X Signal
Calculation: Complex multi-factor oversold reversal detection
Requirements: AMC oversold + wick trap + flash/blink + RSI-MFI oversold + bullish flip
Purpose: Oversold bounce signal with multiple confirmations
Visual: Orange X below price
Characteristics: Reversal signal requiring 5+ simultaneous conditions
VSS (Velocity Signal System)
Components: Volume spike + EMA angle + trend direction
Buy Signal: vssTrigger and vssTrendDir == 1
Sell Signal: vssTrigger and vssTrendDir == -1
Visual: Green/Red triangles
Purpose: Velocity-based momentum detection
Characteristics: Fast-response signal for momentum trading
⭐ Elite Composite Signals
Star Uprising Signal
Base Requirements: entryCompositeBuySignal and echoBodyLong and strongUpTrend and isAMCUp
Additional Confirmations: RSI hybrid strong + not high risk
Special Conditions: At bottom zone OR RSI bottom bounce OR strong volume bounce
Visual: Star symbol below price
Purpose: Bullish reversal signal from oversold conditions
Characteristics: Most selective bullish signal requiring multiple confirmations
Ultra Short Signal
Scoring System: 7-component scoring requiring 4+ points
Key Components: EMA trap + volume decline + RSI weakness + composite confirmation
Additional Requirements: Falling EMA structure + volume spike + flash confirmation
Visual: Explosion emoji above price
Purpose: Aggressive short entry for trend reversal or continuation
Characteristics: Complex multi-layered signal for experienced short selling
🎯 Composite Signal Architecture
Enhanced Composite Scoring
Long Composite: 15+ weighted components including structure, momentum, flash/blink, volume, price action, reversal triggers, trend alignment
Short Composite: Mirror structure with bearish bias
Threshold: 5.0 points required for signal activation
Conflict Resolution: If both long and short signals trigger simultaneously, both are disabled
Final Validation: Requires EMA momentum confirmation (ta.rising(emaFast_ATG, 2) for longs, ta.falling(emaFast_ATG, 2) for shorts)
Risk Assessment Integration
High Risk Long: RSI > 70 OR close > upper Bollinger Band 80%
High Risk Short: RSI < 30 OR close < lower Bollinger Band 80%
Zone Analysis: Top zone (95% of 50-bar high) vs Bottom zone (105% of 50-bar low)
Risk Penalty: High risk conditions subtract 1.5 points from composite scores
This signal architecture creates a multi-layered detection system where simple momentum signals provide foundation, technical analysis adds structure, visual indicators offer clarity, specialized detectors capture different market conditions, and composite signals identify potential opportunities while integrated risk assessment is designed to filter risky entries.
 VISUAL FEATURES SHOWCASE 
Ichimoku Cloud Visualization
Dynamic Color Intensity: Cloud transparency adapts to momentum strength - darker colors indicate stronger directional moves, while lighter transparency shows weakening momentum phases.
Gradient Color Mapping: Bullish momentum renders blue-purple spectrum with increasing opacity, while bearish momentum displays corresponding color gradients with intensity-based transparency.
Real-time Momentum Feedback: Color saturation provides immediate visual feedback on market structure strength, allowing traders to assess levels at a glance without additional indicators.
EMA Ribbon Bands
The 8-level exponential moving average system creates a comprehensive trend structure map with gradient color coding.
Signal Type Visualization
  
 STRATEGY PROPERTIES & BACKTESTING DISCLOSURE 
📊 Default Strategy Configuration:
✅ Initial Capital: 100,000 USD (realistic for average traders)
✅ Commission: 0.075% per trade (realistic exchange fees)
✅ Slippage: 3 ticks (market impact consideration)
✅ Position Size: 5% equity per trade (sustainable risk level)
✅ Pyramiding: Disabled (single position management)
✅ Sample Size: 185 trades over 12-month backtesting period
✅ Risk Management: Adaptive stop loss with maximum 1% risk per trade
COMPREHENSIVE BACKTESTING RESULTS
Testing Period & Market Conditions:
Backtesting Period: June 25, 2024 - June 25, 2025 (12 months)
Timeframe: 15-minute charts (MTF system active)
Market: BTCUSDT (Bitcoin/Tether)
Market Conditions: Full market cycle including volatility periods
Deep Backtesting: Enabled for maximum accuracy
📈 Performance Summary:
Total Return: +2.19% (+2,193.59 USDT)
Total Trades Executed: 185 trades
Win Rate: 34.05% (63 winning trades out of 185)
Profit Factor: 1.295 (gross profit ÷ gross loss)
Maximum Drawdown: 0.65% (653.17 USDT)
Risk-Adjusted Returns: Consistent with conservative risk management approach
📊 Detailed Trade Analysis:
Position Distribution:
Long Positions: 109 trades (58.9%) | Win Rate: 36.70%
Short Positions: 76 trades (41.1%) | Win Rate: 30.26%
Average Trade Duration: Optimized for 15-minute timeframe efficiency
Profitability Metrics:
Average Profit per Trade: 11.74 USDT (0.23%)
Average Winning Trade: 151.17 USDT (3.00%)
Average Losing Trade: 60.27 USDT (1.20%)
Win/Loss Ratio: 2.508 (winners are 2.5x larger than losses)
Largest Single Win: 436.02 USDT (8.69%)
Largest Single Loss: 107.41 USDT (controlled risk management)
💰 Financial Performance Breakdown:
Gross Profit: 9,523.93 USDT (9.52% of capital)
Gross Loss: 7,352.48 USDT (7.35% of capital)
Net Profit After Costs: 2,171.44 USDT (2.17%)
Commission Costs: 1,402.47 USDT (realistic trading expenses)
Maximum Equity Run-up: 2,431.66 USDT (2.38%)
⚖️ Risk Management Validation:
Maximum Drawdown: 0.65% showing controlled risk management
Drawdown Recovery: Consistent equity curve progression
Risk per Trade: Successfully maintained below 1.5% per position
Position Sizing: 5% equity allocation proved sustainable throughout testing period
📋 Strategy Performance Characteristics:
✅ Strengths Demonstrated:
Controlled Risk: Maximum drawdown well below industry standards (< 1%)
Positive Expectancy: Win/loss ratio of 2.5+ creates profitable edge
Consistent Performance: Steady equity curve without extreme volatility
Realistic Costs: Includes actual commission and slippage impacts
Sample Size: 185 trades during testing period
⚠️ Performance Considerations:
Win Rate: 34% win rate requires discipline to follow system signals
Market Dependency: Performance may vary significantly in different market conditions
Timeframe Sensitivity: Optimized for 15-minute charts; other timeframes may show different results
Slippage Impact: Real trading conditions may affect actual performance
📊 Benchmark Comparison:
Strategy Return: +2.19% over 12 months
Buy & Hold Bitcoin: +71.12% over same period
Strategy Advantage: Significantly lower drawdown and volatility
Risk-Adjusted Performance: Different risk profile compared to holding cryptocurrency
🎯 Real-World Application Insights:
Expected Trading Frequency:
Average: 15.4 trades per month (185 trades ÷ 12 months)
Weekly Frequency: Approximately 3-4 trades per week
Active Management: Requires regular monitoring during market hours
Capital Requirements:
Minimum Used in Testing: $10,000 for sustainable position sizing
Tested Range: $50,000-$100,000 for comfortable risk management
Commission Impact: 0.075% per trade totaled 1.4% of capital over 12 months
⚠️ IMPORTANT BACKTESTING DISCLAIMERS:
📈 Performance Reality:
Past performance does not guarantee future results. Backtesting results represent hypothetical performance and may not reflect actual trading outcomes due to market changes, execution differences, and emotional factors.
🔄 Market Condition Dependency:
This strategy's performance during the tested period may not be representative of performance in different market conditions, volatility regimes, or trending vs. sideways markets.
💸 Cost Considerations:
Actual trading costs may vary based on broker selection, market conditions, and trade size. Commission rates and slippage assumptions may differ from real-world execution.
🎯 Realistic Expectations:
The 34% win rate requires psychological discipline to continue following signals during losing streaks. Risk management and position sizing are critical for replicating these results.
⚡ Technology Dependencies:
Strategy performance assumes reliable internet connection, platform stability, and timely signal execution. Technical failures may impact actual results.
 CONFIGURATION OPTIMIZATION 
 
5-Minute Timeframe Optimization (Advanced Users Only)
⚠️ Important Warning: 5-minute timeframes operate without MTF confirmation, resulting in reduced signal quality and higher false signal rates.
Example 5-Minute Parameters:
Composite Thresholds: Long 6.5, Short 7.0 (vs 15M default 5.0/5.4)
Signal Lookback Bars: 12 (vs 15M default 8)
Volume Multiplier: 2.2 (vs 15M default 1.8)
MTF Timeframe: Disabled (automatic below 30M)
Risk Management Adjustments:
Position Size: Reduce to 3% (vs 5% default)
TP1: 0.8%, TP2: 1.2%, TP3: 2.0% (tighter targets)
SL: 0.8% (tighter stop loss)
Cooldown Minutes: 8 (vs 5 default)
Usage Notes for 5-Minute Trading:
- Wait for higher composite scores before entry
- Require stronger volume confirmation
- Monitor EMA structure more closely
15-Minute Scalping Setup:
TP1: 1.0%, TP2: 1.5%, TP3: 2.5%
Composite Threshold: 5.0 (higher filtering)
TP ATR Multiplier: 7.0
SL ATR Multiplier: 2.5
Volume Multiplier: 1.8 (requires stronger confirmation)
Hold Time: 2 bars minimum
3-Hour Swing Setup:
TP1: 2.0%, TP2: 4.0%, TP3: 8.0%
Composite Threshold: 4.5 (more signals)
TP ATR Multiplier: 8.0
SL ATR Multiplier: 3.2
Volume Multiplier: 1.2
Hold Time: 6 bars minimum
 Market-Specific Adjustments 
High Volatility Periods:
Increase ATR multipliers (TP: 2.0x, SL: 1.2x)
Raise composite thresholds (+0.5 points)
Reduce position size
Enable cooldown periods
Low Volatility Periods:
Decrease ATR multipliers (TP: 1.2x, SL: 0.8x)
Lower composite thresholds (-0.3 points)
Standard position sizing
Disable extended cooldowns
News Events:
Temporarily disable strategy 30 minutes before major releases
Increase volume requirements (2.0x multiplier)
Reduce position sizes by 50%
Monitor for unusual price action
 RISK MANAGEMENT 
Dual ROI System: Adaptive vs Fixed Mode
Adaptive RR Mode:
Uses ATR (Average True Range) for automatic adjustment
TP1: 1.0x ATR from entry price
TP2: 1.5x ATR from entry price
TP3: 2.0x ATR from entry price
Stop Loss: 1.0x ATR from entry price
Automatically adjusts to market volatility
Fixed Percentage Mode:
Uses predetermined percentage levels
TP1: 1.0% (default)
TP2: 1.5% (default)
TP3: 2.5% (default)
Stop Loss: 0.9% total (0.6% risk tolerance + 0.3% slippage buffer)(default)
Consistent levels regardless of volatility
Mode Selection: Enable "Use Adaptive RR" for ATR-based targets, disable for fixed percentages. Adaptive mode works better in varying volatility conditions, while fixed mode provides predictable risk/reward ratios.
 Stop Loss Management 
In Adaptive SL Mode:
Automatically scales with market volatility
Tight stops during low volatility (smaller ATR)
Wider stops during high volatility (larger ATR)
Include 0.3% slippage buffer in both modes
In Fixed Mode:
Consistent percentage-based stops
2% for crypto, 1.5% for forex, 1% for stocks
Manual adjustment needed for different market conditions
 Trailing Stop System 
Configuration:
Enable Trailing: Activates dynamic stop loss adjustment
Start Trailing %: Profit level to begin trailing (default 1.0%)
Trailing Offset %: Distance from current price (default 0.5%)
Close if Return to Entry: Optional immediate exit if price returns to entry level
Operation: Once position reaches trailing start level, stop loss automatically adjusts upward (longs) or downward (shorts) maintaining the offset distance from favorable price movement.
Timeframe-Specific Risk Considerations
15-Minute and Above (Tested):
✅ Full MTF system active
✅ Standard risk parameters apply
✅ Backtested performance metrics valid
✅ Standard position sizing (5%)
5-Minute Timeframes (Advanced Only):
⚠️ MTF system inactive - local signals only  
⚠️ Higher false signal rate expected
⚠️ Reduced position sizing preferred (3%)
⚠️ Tighter stop losses required (0.8% vs 1.2%)
⚠️ Requires parameter optimization
⚠️ Monitor performance closely
1-Minute Timeframes (Limited Testing):
❌ Excessive noise levels
❌ Strategy not optimized for this frequency
 Risk Management Practices 
Allocate no more than 5% of your total investment portfolio to high-risk trading
Never trade with funds you cannot afford to lose
Thoroughly backtest and validate the strategy with small amounts before full implementation
Always maintain proper risk management and stop-loss settings
 IMPORTANT DISCLAIMERS 
Performance Disclaimer
Past performance does not guarantee future results. All trading involves substantial risk of loss. This strategy is provided for informational purposes and does not constitute financial advice.
Market Risk
Cryptocurrency and forex markets are highly volatile. Prices can move rapidly against positions, resulting in significant losses. Users should never risk more than they can afford to lose.
Strategy Limitations
This strategy relies on technical analysis and may not perform well during fundamental market shifts, news events, or unprecedented market conditions. No trading strategy can guarantee 100% success or eliminate the risk of loss.
Legal Compliance
You are responsible for compliance with all applicable regulations and laws in your jurisdiction. Consult with licensed financial professionals when necessary.
User Responsibility
Users are responsible for their own trading decisions, risk management, and compliance with applicable regulations in their jurisdiction.
Qullamaggie [Modified] | FractalystWhat's the purpose of this strategy? 
The strategy aims to identify high-probability breakout setups in trending markets, inspired by Kristjan "Qullamaggie" Kullamägi’s approach. 
It focuses on capturing explosive price moves after periods of consolidation, using technical criteria like moving averages, breakouts, trailing stop-loss and momentum confirmation. 
  
Ideal for swing traders seeking to ride strong trends while managing risk.
----
 How does the strategy work? 
The strategy follows a systematic process to capture high-momentum breakouts:
 Pre-Breakout Criteria: 
Prior Price Surge: Identifies stocks that have rallied 30-100%+ in recent month(s), signaling strong underlying momentum (per Qullamaggie’s volatility expansion principles).
 Consolidation Phase:  Looks for a tightening price range (e.g., flag, pennant, or tight base), indicating a potential "coiling" before continuation.
 Trend Confirmation:  Uses moving averages (e.g., 20/50/200 EMA) to ensure the stock is trading above key averages on the daily chart, confirming an uptrend.
 Price Break:  Enters when price clears the consolidation high with conviction.
 Risk Management: 
 Initial Stop Loss:  Placed below the consolidation low or a recent swing point to limit downside.
 Break-Even Adjustment:  Moves stop loss to breakeven once the trade reaches 1.5x risk-to-reward (RR), securing a "free trade" while letting winners run.
 Trailing Stop (Unique Edge): 
Market Structure Trailing: Instead of trailing via moving averages, the stop is dynamically adjusted using structural invalidation level. This adapts to price action, allowing the trade to stay open during volatile retracements while locking in gains as new structure forms.
 Why This Matters:  Most strategies use rigid trailing stops (e.g., below the 10EMA), which often exit prematurely in choppy markets. By trailing based on structure, this strategy avoids "noise" and captures larger trends, directly boosting overall returns.
----
 What markets or timeframes is this suited for? 
This is a long-only strategy designed for trending markets, and it performs best in:
Markets: Stocks (especially high-growth, liquid equities), cryptocurrencies (major pairs with strong volatility), commodities (e.g., oil, gold), and futures (index/commodity futures).
Timeframes: Primarily daily charts for swing trades (1-30 day holds), though weekly charts can help confirm broader trends.
Key Advantage: The TradingView script allows instant backtesting with adjustable parameters
You can:
- Test historical performance across multiple markets to identify which assets align best with the strategy.
- Optimize settings (e.g., trailing stop sensitivity, moving averages etc.) to match a market’s volatility profile.
 Build a diversified portfolio by filtering for markets that show consistent profitability in backtests. 
 For example, you might discover cryptos require tighter trailing stops due to volatility, while stocks thrive with wider structural stops. The script automates this analysis, letting you to trade confidently. 
----
 What indicators or tools does the strategy use? 
The strategy combines customizable technical tools with strict anti-lookahead safeguards:
 Core Indicators: 
 Moving Averages:  Adjustable periods (e.g., 20/50/200 EMA or SMA) and timeframes (daily/weekly) to confirm trend alignment. Users can test combinations (e.g., 10EMA vs. 20EMA) to optimize for specific markets.
 Breakout Parameters: 
 Consolidation Length:  Adjustable window to define the "tightness" of the pre-breakout pattern.
 Entry Models:  Flexible entry logics (Breakouts and fractals)
 Anti-Lookahead Design: 
All calculations (e.g., moving averages, consolidation ranges, volume averages) use only closed/confirmed data available at the time of the signal.
----
 How do I manage risk with this strategy? 
The strategy prioritizes customizable risk controls to align with your trading style and account size:
 User-Defined Risk Inputs: 
 Risk Per Trade:  Set a % of Equity (e.g., 1-2%) to determine position size. The strategy auto-calculates shares/contracts to match your selected risk per trade.
Flexibility: Choose between fixed risk or equity-based scaling. 
The script adjusts position sizing dynamically based on your selection.
 Pyramiding Feature: 
 Customizable Entries:  Adjust the number of pyramiding trades allowed (e.g., 1-3 additional positions) in the strategy settings. Each new entry is triggered only if the prior trade hits its 1.5x RR target and the trend remains intact.
 Risk-Scaled Additions:  New positions use profits from prior trades, compounding gains without increasing initial risk.
 Risk-Free Trade Mechanic: 
Once a trade reaches 1.5x RR, the stop loss is moved to breakeven, eliminating downside risk.
The strategy then opens a new position (if pyramiding is enabled) using a portion of the locked-in profit. This "snowballs" winners while keeping total capital exposure stable.
Impact on Net Profit & Drawdown:
 Net Profit Boost:  Pyramiding lets you ride multi-leg trends aggressively. For example, a 100% runner could generate 2-3x more profit vs. a single-entry approach.
 Controlled Drawdowns:  Since new positions are funded by profits (not initial capital), max drawdown stays anchored to your original risk per trade (e.g., 1-2% of account). Even if later entries fail, the breakeven stop on prior trades protects overall equity.
 Why This Works:  Most strategies either over-leverage (increasing drawdowns) or exit too early. By recycling profits into new positions only after securing risk-free capital, this approach mimics hedge fund "scaling in" tactics while staying retail-trader friendly.
----
 How does the strategy identify market structure for its trailing stoploss? 
The strategy identifies market structure by utilizing an efficient logic with for loops to pinpoint the first swing candle that features a pivot of 2. This marks the beginning of the break of structure, where the market's previous trend or pattern is considered invalidated or changed.
----
 What are the underlying calculations? 
The underlying calculations involve:
Identifying Swing Points: The strategy looks for swing highs (marked with blue Xs) and swing lows (marked with red Xs). A swing high is identified when a candle's high is higher than the highs of the candles before and after it. Conversely, a swing low is when a candle's low is lower than the lows of the candles before and after it.
 Break of Structure (BOS): 
Bullish BOS: This occurs when the price breaks above the swing high level of the previous structure, indicating a potential shift to a bullish trend.
Bearish BOS: This happens when the price breaks below the swing low level of the previous structure, signaling a potential shift to a bearish trend.
 Structural Liquidity and Invalidation: 
Structural Liquidity: After a break of structure, liquidity levels are updated to the first swing high in a bullish BOS or the first swing low in a bearish BOS.
Structural Invalidation: If the price moves back to the level of the first swing low before the bullish BOS or the first swing high before the bearish BOS, it invalidates the break of structure, suggesting a potential reversal or continuation of the previous trend.
This method provides users with a technical approach to filter market regimes, offering an advantage by minimizing the risk of overfitting to historical data, which is often a concern with traditional indicators like moving averages.
By focusing on identifying pivotal swing points and the subsequent breaks of structure, the strategy maintains a balance between sensitivity to market changes and robustness against historical data anomalies, ensuring a more adaptable and potentially more reliable market analysis tool.
----
 What entry criteria are used in this script? 
The script uses two entry models for trading decisions: BreakOut and Fractal.
Underlying Calculations:
Breakout: The script records the most recent swing high by storing it in a variable. When the price closes above this recorded level, and all other predefined conditions are satisfied, the script triggers a breakout entry. This approach is considered conservative because it waits for the price to confirm a breakout above the previous high before entering a trade. As shown in the image, as soon as the price closes above the new candle (first tick), the long entry gets taken. The stop-loss is initially set and then moved to break-even once the price moves in favor of the trade.
Fractal: This method involves identifying a swing low with a period of 2, which means it looks for a low point where the price is lower than the two candles before and after it. Once this pattern is detected, the script executes the trade. This is an aggressive approach since it doesn't wait for further price confirmation. In the image, this is represented by the 'Fractal 2' label where the script identifies and acts on the swing low pattern.
----
 What type of stop-loss identification method are used in this strategy? 
This strategy employs two types of stop-loss methods: Initial Stop-loss and Trailing Stop-Loss.
Underlying Calculations:
Initial Stop-loss:
ATR Based: The strategy uses the Average True Range (ATR) to set an initial stop-loss, which helps in accounting for market volatility without predicting price direction.
Calculation:
- First, the True Range (TR) is calculated for each period, which is the greatest of:
- Current Period High - Current Period Low
- Absolute Value of Current Period High - Previous Period Close
- Absolute Value of Current Period Low - Previous Period Close
- The ATR is then the moving average of these TR values over a specified period, typically 14 periods by default. This ATR value can be used to set the stop-loss at a distance from the entry price that reflects the current market volatility.
Swing Low Based:
For this method, the stop-loss is set based on the most recent swing low identified in the market structure analysis. This approach uses the lowest point of the recent price action as a reference for setting the stop-loss.
Trailing Stop-Loss:
The strategy uses structural liquidity and structural invalidation levels across multiple timeframes to adjust the stop-loss once the trade is profitable. This method involves:
Detecting Structural Liquidity: After a break of structure, the liquidity levels are updated to the first swing high in a bullish scenario or the first swing low in a bearish scenario. These levels serve as potential areas where the price might find support or resistance, allowing the stop-loss to trail the price movement.
Detecting Structural Invalidation: If the price returns to the level of the first swing low before a bullish break of structure or the first swing high before a bearish break of structure, it suggests the trend might be reversing or invalidating, prompting the adjustment of the stop-loss to lock in profits or minimize losses.
By using these methods, the strategy dynamically adjusts the initial stop-loss based on market volatility, helping to protect against adverse price movements while allowing for enough room for trades to develop. The ATR-based stop-loss adapts to the current market conditions by considering the volatility, ensuring that the stop-loss is not too tight during volatile periods, which could lead to premature exits, nor too loose during calm markets, which might result in larger losses. Similarly, the swing low based stop-loss provides a logical exit point if the market structure changes unfavorably.
Each market behaves differently across various timeframes, and it is essential to test different parameters and optimizations to find out which trailing stop-loss method gives you the desired results and performance. This involves backtesting the strategy with different settings for the ATR period, the distance from the swing low, and how the trailing stop-loss reacts to structural liquidity and invalidation levels.
Through this process, you can tailor the strategy to perform optimally in different market environments, ensuring that the stop-loss mechanism supports the trade's longevity while safeguarding against significant drawdowns.
----
What type of break-even method is used in this strategy? What are the underlying calculations?
Moves the initial stop-loss to the entry price when the price reaches a certain RR ratio.
Calculation:
Break-even level = Entry Price + (Initial Risk * RR Ratio)
----
What tables are available in this script?
- Summary: Provides a general overview, displaying key performance parameters such as Net Profit, Profit Factor, Max Drawdown, Average Trade, Closed Trades and more.
Total Commission: Displays the cumulative commissions incurred from all trades executed within the selected backtesting window. This value is derived by summing the commission fees for each trade on your chart.
Average Commission: Represents the average commission per trade, calculated by dividing the Total Commission by the total number of closed trades. This metric is crucial for assessing the impact of trading costs on overall profitability.
Avg Trade: The sum of money gained or lost by the average trade generated by a strategy. Calculated by dividing the Net Profit by the overall number of closed trades. An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.
MaxDD: Displays the largest drawdown of losses, i.e., the maximum possible loss that the strategy could have incurred among all of the trades it has made. This value is calculated separately for every bar that the strategy spends with an open position.
Profit Factor: The amount of money a trading strategy made for every unit of money it lost (in the selected currency). This value is calculated by dividing gross profits by gross losses.
Avg RR: This is calculated by dividing the average winning trade by the average losing trade. This field is not a very meaningful value by itself because it does not take into account the ratio of the number of winning vs losing trades, and strategies can have different approaches to profitability. A strategy may trade at every possibility in order to capture many small profits, yet have an average losing trade greater than the average winning trade. The higher this value is, the better, but it should be considered together with the percentage of winning trades and the net profit.
Winrate: The percentage of winning trades generated by a strategy. Calculated by dividing the number of winning trades by the total number of closed trades generated by a strategy. Percent profitable is not a very reliable measure by itself. A strategy could have many small winning trades, making the percent profitable high with a small average winning trade, or a few big winning trades accounting for a low percent profitable and a big average winning trade. Most mean-reversion successful strategies have a percent profitability of 40-80% but are profitable due to risk management control.
BE Trades: Number of break-even trades, excluding commission/slippage.
Losing Trades: The total number of losing trades generated by the strategy.
Winning Trades: The total number of winning trades generated by the strategy.
Total Trades: Total number of taken traders visible your charts.
Net Profit: The overall profit or loss (in the selected currency) achieved by the trading strategy in the test period. The value is the sum of all values from the Profit column (on the List of Trades tab), taking into account the sign.
- Monthly: Displays performance data on a month-by-month basis, allowing users to analyze performance trends over each month and year.
- Weekly: Displays performance data on a week-by-week basis, helping users to understand weekly performance variations.
- UI Table: A user-friendly table that allows users to view and save the selected strategy parameters from user inputs. This table enables easy access to key settings and configurations, providing a straightforward solution for saving strategy parameters by simply taking a screenshot with Alt + S or ⌥ + S.
 User-input styles and customizations: 
Please note that all background colors in the style are disabled by default to enhance visualization.
 How to Use This Strategy to Create a Profitable Edge and Systems? 
Choose Your Strategy mode:
- Decide whether you are creating an investing strategy or a trading strategy.
Select a Market:
- Choose a one-sided market such as stocks, indices, or cryptocurrencies.
Historical Data:
- Ensure the historical data covers at least 10 years of price action for robust backtesting.
Timeframe Selection:
- Choose the timeframe you are comfortable trading with. It is strongly recommended to use a timeframe above 15 minutes to minimize the impact of commissions/slippage on your profits.
Set Commission and Slippage:
- Properly set the commission and slippage in the strategy properties according to your broker/prop firm specifications.
Parameter Optimization:
- Use trial and error to test different parameters until you find the performance results you are looking for in the summary table or, preferably, through deep backtesting using the strategy tester.
Trade Count:
- Ensure the number of trades is 200 or more; the higher, the better for statistical significance.
Positive Average Trade:
- Make sure the average trade is above zero.
(An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.)
Performance Metrics:
- Look for a high profit factor, and net profit with minimum drawdown.
- Ideally, aim for a drawdown under 20-30%, depending on your risk tolerance.
Refinement and Optimization:
- Try out different markets and timeframes.
- Continue working on refining your edge using the available filters and components to further optimize your strategy.
 What Makes This Strategy Unique? 
This strategy combines flexibility, smart risk management, and momentum focus in a way that’s rare and practical:
 1. Adapts to Any Market Rhythm 
Works on daily, weekly, or intraday charts without code changes.
Uses two entry types: classic breakouts (like trending stocks) or fractal patterns (to avoid false starts).
 2. Smarter Stop-Loss System 
No rigid rules: Stops adjust based on price structure (e.g., new “higher lows”), not fixed percentages.
Avoids whipsaws: Tightens stops only when the trend strengthens, not in choppy markets.
 3. Safe Profit-Boosting Pyramiding 
Adds new positions only after prior trades are risk-free (stops moved above breakeven).
Scales up using locked-in profits, not new capital, to grow gains safely.
 4. Built-In Momentum Check 
Tracks 1/3/6-month price growth to spotlight stocks with strong, lasting momentum.
 Terms and Conditions | Disclaimer 
 Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
- By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Dollar Cost Averaging (DCA) | FractalystWhat's the purpose of this strategy? 
The purpose of dollar cost averaging (DCA) is to grow investments over time using a disciplined, methodical approach used by many top institutions like MicroStrategy and other institutions.
  
Here's how it functions:
 Dollar Cost Averaging (DCA):  This technique involves investing a set amount of money regularly, regardless of market conditions. It helps to mitigate the risk of investing a large sum at a peak price by spreading out your investment, thus potentially lowering your average cost per share over time.
 Regular Contributions:  By adding money to your investments on a pre-determined frequency and dollar amount defined by the user, you take advantage of compounding. The script will remind you to contribute based on your chosen schedule, which can be weekly, bi-weekly, monthly, quarterly, or yearly. This systematic approach ensures that your returns can earn their own returns, much like interest on savings but potentially at a higher rate.
 Technical Analysis:  The strategy employs a market trend ratio to gauge market sentiment. It calculates the ratio of bullish vs bearish breakouts across various timeframes, assigning this ratio a percentage-based score to determine the directional bias. Once this score exceeds a user-selected percentage, the strategy looks to take buy entries, signaling a favorable time for investment based on current market trends.
 Fundamental Analysis:  This aspect looks at the health of the economy and companies within it to determine bullish market conditions. Specifically, we consider:
Specifically, it considers:
 Interest Rate:  High interest rates can affect borrowing costs, potentially slowing down economic growth or making stocks less attractive compared to fixed income.
 Inflation Rate:  Inflation erodes purchasing power, but moderate inflation can be a sign of a healthy economy. We look for investments that might benefit from or withstand inflation.
 GDP Rate:  GDP growth indicates the overall health of the economy; we aim to invest in sectors poised to grow with the economy.
 Unemployment Rate:  Lower unemployment typically signals consumer confidence and spending power, which can boost certain sectors.
By integrating these elements, the strategy aims to:
 Reduce Investment Volatility:  By spreading out your investments, you're less impacted by short-term market swings.
 Enhance Growth Potential:  Using both technical and fundamental filters helps in choosing investments that are more likely to appreciate over time.
 Manage Risk:  The strategy aims to balance the risk of market timing by investing consistently and choosing assets wisely based on both economic data and market conditions.
----
 What are Regular Contributions in this strategy? 
Regular Contributions involve adding money to your investments on a pre-determined frequency and dollar amount defined by the user. The script will remind you to contribute based on your chosen schedule, which can be weekly, bi-weekly, monthly, quarterly, or yearly. This systematic approach ensures that your returns can earn their own returns, much like interest on savings but potentially at a higher rate.
  
----
 How do regular contributions enhance compounding and reduce timing risk? 
Enhances Compounding: Regular contributions leverage the power of compounding, where returns on investments can generate their own returns, potentially leading to exponential growth over time.
Reduces Timing Risk: By investing regularly, the strategy minimizes the risk associated with trying to time the market, spreading out the investment cost over time and potentially reducing the impact of volatility.
Automated Reminders: The script reminds users to make contributions based on their chosen schedule, ensuring consistency and discipline in investment practices, which is crucial for long-term success.
  
----
 How does the strategy integrate technical and fundamental analysis for investors? 
A: The strategy combines technical and fundamental analysis in the following manner:
Technical Analysis: It uses a market trend ratio to determine the directional bias by calculating the ratio of bullish vs bearish breakouts. Once this ratio exceeds a user-selected percentage threshold, the strategy signals to take buy entries, optimizing the timing within the given timeframe(s).
  
Fundamental Analysis: This aspect assesses the broader economic environment to identify sectors or assets that are likely to benefit from current economic conditions. By understanding these fundamentals, the strategy ensures investments are made in assets with strong growth potential.
This integration allows the strategy to select investments that are both technically favorable for entry and fundamentally sound, providing a comprehensive approach to investment decisions in the crypto, stock, and commodities markets.
----
 How does the strategy identify market structure? What are the underlying calculations? 
Q: How does the strategy identify market structure?
A: The strategy identifies market structure by utilizing an efficient logic with for loops to pinpoint the first swing candle that features a pivot of 2. This marks the beginning of the break of structure, where the market's previous trend or pattern is considered invalidated or changed.
  
 What are the underlying calculations for identifying market structure? 
A: The underlying calculations involve:
 Identifying Swing Points:  The strategy looks for swing highs (marked with blue Xs) and swing lows (marked with red Xs). A swing high is identified when a candle's high is higher than the highs of the candles before and after it. Conversely, a swing low is when a candle's low is lower than the lows of the candles before and after it.
 Break of Structure (BOS):  
Bullish BOS: This occurs when the price breaks above the swing high level of the previous structure, indicating a potential shift to a bullish trend.
Bearish BOS: This happens when the price breaks below the swing low level of the previous structure, signaling a potential shift to a bearish trend.
 Structural Liquidity and Invalidation:  
Structural Liquidity: After a break of structure, liquidity levels are updated to the first swing high in a bullish BOS or the first swing low in a bearish BOS.
Structural Invalidation: If the price moves back to the level of the first swing low before the bullish BOS or the first swing high before the bearish BOS, it invalidates the break of structure, suggesting a potential reversal or continuation of the previous trend.
  
This method provides users with a technical approach to filter market regimes, offering an advantage by minimizing the risk of overfitting to historical data, which is often a concern with traditional indicators like moving averages. 
By focusing on identifying pivotal swing points and the subsequent breaks of structure, the strategy maintains a balance between sensitivity to market changes and robustness against historical data anomalies, ensuring a more adaptable and potentially more reliable market analysis tool.
 What entry criteria are used in this script? 
The script uses two entry models for trading decisions:  BreakOut and Fractal. 
 Underlying Calculations: 
 Breakout:  The script records the most recent swing high by storing it in a variable. When the price closes above this recorded level, and all other predefined conditions are satisfied, the script triggers a breakout entry. This approach is considered conservative because it waits for the price to confirm a breakout above the previous high before entering a trade. As shown in the image, as soon as the price closes above the new candle (first tick), the long entry gets taken. The stop-loss is initially set and then moved to break-even once the price moves in favor of the trade.
 Fractal:  This method involves identifying a swing low with a period of 2, which means it looks for a low point where the price is lower than the two candles before and after it. Once this pattern is detected, the script executes the trade. This is an aggressive approach since it doesn't wait for further price confirmation. In the image, this is represented by the 'Fractal 2' label where the script identifies and acts on the swing low pattern.
  
----
 How does the script calculate trend score? What are the underlying calculations? 
 Market Trend Ratio:  The script calculates the ratio of bullish to bearish breakouts. This involves:
 Counting Bullish Breakouts:  A bullish breakout is counted when the price breaks above a recent swing high (as identified in the strategy's market structure analysis).
 Counting Bearish Breakouts:  A bearish breakout is counted when the price breaks below a recent swing low.
 Percentage-Based Score:  This ratio is then converted into a percentage-based score:
For example, if there are 10 bullish breakouts and 5 bearish breakouts in a given timeframe, the ratio would be 10:5 or 2:1. This could be translated into a score where 66.67% (10/(10+5) * 100) represents the bullish trend strength.
  
The score might be calculated as  (Number of Bullish Breakouts / Total Breakouts) * 100. 
 User-Defined Threshold:  The strategy uses this score to determine when to take buy entries. If the trend score exceeds a user-defined percentage threshold, it indicates a strong enough bullish trend to justify a buy entry. For instance, if the user sets the threshold at 60%, the script would look for a buy entry when the trend score is above this level.
 Timeframe Consideration:  The calculations are performed across the timeframes specified by the user, ensuring the trend score reflects the market's behavior over different periods, which could be daily, weekly, or any other relevant timeframe.
This method provides a quantitative measure of market trend strength, helping to make informed decisions based on the balance between bullish and bearish market movements.
 What type of stop-loss identification method are used in this strategy? 
This strategy employs two types of stop-loss methods:  Initial Stop-loss and Trailing Stop-Loss. 
Underlying Calculations:
 Initial Stop-loss: 
ATR Based: The strategy uses the Average True Range (ATR) to set an initial stop-loss, which helps in accounting for market volatility without predicting price direction.
Calculation:
- First, the True Range (TR) is calculated for each period, which is the greatest of:
- Current Period High - Current Period Low
- Absolute Value of Current Period High - Previous Period Close
- Absolute Value of Current Period Low - Previous Period Close
- The ATR is then the moving average of these TR values over a specified period, typically 14 periods by default. This ATR value can be used to set the stop-loss at a distance from the entry price that reflects the current market volatility.
 Swing Low Based:  
For this method, the stop-loss is set based on the most recent swing low identified in the market structure analysis. This approach uses the lowest point of the recent price action as a reference for setting the stop-loss.
 Trailing Stop-Loss: 
The strategy uses structural liquidity and structural invalidation levels across multiple timeframes to adjust the stop-loss once the trade is profitable. This method involves:
Detecting Structural Liquidity: After a break of structure, the liquidity levels are updated to the first swing high in a bullish scenario or the first swing low in a bearish scenario. These levels serve as potential areas where the price might find support or resistance, allowing the stop-loss to trail the price movement.
 Detecting Structural Invalidation:  If the price returns to the level of the first swing low before a bullish break of structure or the first swing high before a bearish break of structure, it suggests the trend might be reversing or invalidating, prompting the adjustment of the stop-loss to lock in profits or minimize losses.
  
By using these methods, the strategy dynamically adjusts the initial stop-loss based on market volatility, helping to protect against adverse price movements while allowing for enough room for trades to develop. The ATR-based stop-loss adapts to the current market conditions by considering the volatility, ensuring that the stop-loss is not too tight during volatile periods, which could lead to premature exits, nor too loose during calm markets, which might result in larger losses. Similarly, the swing low based stop-loss provides a logical exit point if the market structure changes unfavorably.
Each market behaves differently across various timeframes, and it is essential to test different parameters and optimizations to find out which trailing stop-loss method gives you the desired results and performance. This involves backtesting the strategy with different settings for the ATR period, the distance from the swing low, and how the trailing stop-loss reacts to structural liquidity and invalidation levels. 
Through this process, you can tailor the strategy to perform optimally in different market environments, ensuring that the stop-loss mechanism supports the trade's longevity while safeguarding against significant drawdowns.
 What type of break-even and take profit identification methods are used in this strategy? What are the underlying calculations? 
For Break-Even:
Percentage (%) Based:
Moves the initial stop-loss to the entry price when the price reaches a certain percentage above the entry.
Calculation:
Break-even level = Entry Price * (1 + Percentage / 100)
Example:
If the entry price is $100 and the break-even percentage is 5%, the break-even level is $100 * 1.05 = $105.
Risk-to-Reward (RR) Based:
  
Moves the initial stop-loss to the entry price when the price reaches a certain RR ratio.
Calculation:
Break-even level = Entry Price + (Initial Risk * RR Ratio)
For TP
- You can choose to set a take profit level at which your position gets fully closed.
- Similar to break-even, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP1 level as a percentage amount above the entry price or based on RR.
 What's the day filter Filter, what does it do? 
The day filter allows users to customize the session time and choose the specific days they want to include in the strategy session. This helps traders tailor their strategies to particular trading sessions or days of the week when they believe the market conditions are more favorable for their trading style.
Customize Session Time:
Users can define the start and end times for the trading session.
This allows the strategy to only consider trades within the specified time window, focusing on periods of higher market activity or preferred trading hours.
Select Days:
Users can select which days of the week to include in the strategy.
This feature is useful for excluding days with historically lower volatility or unfavorable trading conditions (e.g., Mondays or Fridays).
Benefits:
Focus on Optimal Trading Periods:
By customizing session times and days, traders can focus on periods when the market is more likely to present profitable opportunities.
Avoid Unfavorable Conditions:
Excluding specific days or times can help avoid trading during periods of low liquidity or high unpredictability, such as major news events or holidays.
 What tables are available in this script? 
  
- Summary: Provides a general overview, displaying key performance parameters such as Net Profit, Profit Factor, Max Drawdown, Average Trade, Closed Trades and more.
Total Commission: Displays the cumulative commissions incurred from all trades executed within the selected backtesting window. This value is derived by summing the commission fees for each trade on your chart.
Average Commission: Represents the average commission per trade, calculated by dividing the Total Commission by the total number of closed trades. This metric is crucial for assessing the impact of trading costs on overall profitability.
Avg Trade: The sum of money gained or lost by the average trade generated by a strategy. Calculated by dividing the Net Profit by the overall number of closed trades. An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.
MaxDD: Displays the largest drawdown of losses, i.e., the maximum possible loss that the strategy could have incurred among all of the trades it has made. This value is calculated separately for every bar that the strategy spends with an open position.
Profit Factor: The amount of money a trading strategy made for every unit of money it lost (in the selected currency). This value is calculated by dividing gross profits by gross losses.
Avg RR: This is calculated by dividing the average winning trade by the average losing trade. This field is not a very meaningful value by itself because it does not take into account the ratio of the number of winning vs losing trades, and strategies can have different approaches to profitability. A strategy may trade at every possibility in order to capture many small profits, yet have an average losing trade greater than the average winning trade. The higher this value is, the better, but it should be considered together with the percentage of winning trades and the net profit.
Winrate: The percentage of winning trades generated by a strategy. Calculated by dividing the number of winning trades by the total number of closed trades generated by a strategy. Percent profitable is not a very reliable measure by itself. A strategy could have many small winning trades, making the percent profitable high with a small average winning trade, or a few big winning trades accounting for a low percent profitable and a big average winning trade. Most mean-reversion successful strategies have a percent profitability of 40-80% but are profitable due to risk management control.
BE Trades: Number of break-even trades, excluding commission/slippage.
Losing Trades: The total number of losing trades generated by the strategy.
Winning Trades: The total number of winning trades generated by the strategy.
Total Trades: Total number of taken traders visible your charts.
Net Profit: The overall profit or loss (in the selected currency) achieved by the trading strategy in the test period. The value is the sum of all values from the Profit column (on the List of Trades tab), taking into account the sign.
- Monthly: Displays performance data on a month-by-month basis, allowing users to analyze performance trends over each month and year.
  
- Weekly: Displays performance data on a week-by-week basis, helping users to understand weekly performance variations.
  
- UI Table: A user-friendly table that allows users to view and save the selected strategy parameters from user inputs. This table enables easy access to key settings and configurations, providing a straightforward solution for saving strategy parameters by simply taking a screenshot with Alt + S or ⌥ + S.
 User-input styles and customizations: 
Please note that all background colors in the style are disabled by default to enhance visualization.
 How to Use This Strategy to Create a Profitable Edge and Systems? 
Choose Your Strategy mode:
- Decide whether you are creating an investing strategy or a trading strategy.
Select a Market:
- Choose a one-sided market such as stocks, indices, or cryptocurrencies.
Historical Data:
- Ensure the historical data covers at least 10 years of price action for robust backtesting.
Timeframe Selection:
- Choose the timeframe you are comfortable trading with. It is strongly recommended to use a timeframe above 15 minutes to minimize the impact of commissions/slippage on your profits.
Set Commission and Slippage:
- Properly set the commission and slippage in the strategy properties according to your broker/prop firm specifications.
Parameter Optimization:
- Use trial and error to test different parameters until you find the performance results you are looking for in the summary table or, preferably, through deep backtesting using the strategy tester.
Trade Count:
- Ensure the number of trades is 200 or more; the higher, the better for statistical significance.
Positive Average Trade:
- Make sure the average trade is above zero.
(An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.)
Performance Metrics:
- Look for a high profit factor, and net profit with minimum drawdown.
- Ideally, aim for a drawdown under 20-30%, depending on your risk tolerance.
Refinement and Optimization:
- Try out different markets and timeframes.
- Continue working on refining your edge using the available filters and components to further optimize your strategy.
 What makes this strategy original? 
 Incorporation of Fundamental Analysis: 
This strategy integrates fundamental analysis by considering key economic indicators such as interest rates, inflation, GDP growth, and unemployment rates. These fundamentals help in assessing the broader economic health, which in turn influences sector performance and market trends. By understanding these economic conditions, the strategy can identify sectors or assets that are likely to thrive, ensuring investments are made in environments conducive to growth. This approach allows for a more informed investment decision, aligning technical entries with fundamentally strong market conditions, thus potentially enhancing the strategy's effectiveness over time.
Technical Analysis Without Classical Methods:
The strategy's technical analysis diverges from traditional methods like moving averages by focusing on market structure through a trend score system. 
Instead of using lagging indicators, it employs a real-time analysis of market trends by calculating the ratio of bullish to bearish breakouts. This provides several benefits:
 Immediate Market Sentiment:  The trend score system reacts more dynamically to current market conditions, offering insights into the market's immediate sentiment rather than historical trends, which can often lag behind real-time changes.
 Reduced Overfitting:  By not relying on moving averages or similar classical indicators, the strategy avoids the common pitfall of overfitting to historical data, which can lead to poor performance in new market conditions. The trend score provides a fresh perspective on market direction, potentially leading to more robust trading signals.
 Clear Entry Signals:  With the trend score, entry decisions are based on a clear percentage threshold, making the strategy's decision-making process straightforward and less subjective than interpreting moving average crossovers or similar signals.
Regular Contributions and Reminders:
The strategy encourages regular investments through a system of predefined frequency and amount, which could be weekly, bi-weekly, monthly, quarterly, or yearly. This systematic approach:
 Enhances Compounding:  Regular contributions leverage the power of compounding, where returns on investments can generate their own returns, potentially leading to exponential growth over time.
 Reduces Timing Risk:  By investing regularly, the strategy minimizes the risk associated with trying to time the market, spreading out the investment cost over time and potentially reducing the impact of volatility.
 Automated Reminders:  The script reminds users to make contributions based on their chosen schedule, ensuring consistency and discipline in investment practices, which is crucial for long-term success.
 Long-Term Wealth Building: 
Focused on long-term wealth accumulation, this strategy:
 Promotes Patience and Discipline:  By emphasizing regular contributions and a disciplined approach to both entry and risk management, it aligns with the principles of long-term investing, discouraging impulsive decisions based on short-term market fluctuations.
 Diversification Across Asset Classes:  Operating across crypto, stocks, and commodities, the strategy provides diversification, which is a key component of long-term wealth building, reducing risk through varied exposure.
 Growth Over Time:  The strategy's design to work with the market's natural growth cycles, supported by fundamental analysis, aims for sustainable growth rather than quick profits, aligning with the goals of investors looking to build wealth over decades.
This comprehensive approach, combining fundamental insights, innovative technical analysis, disciplined investment habits, and a focus on long-term growth, offers a unique and potentially effective pathway for investors seeking to build wealth steadily over time.
 Terms and Conditions | Disclaimer 
 Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data.
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
- By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Easy Trade Pro [Buy and Sell Strategy + Backtesting System]Hello Traders,
Easy Trade Pro is a comprehensive tool that combines multiple technical indicators into a single customizable one. This tool is the culmination of an extensive trading career, it is designed to help traders navigate the markets in any timeframe and financial asset, like Equities, Futures, Crypto, Forex and Commodities.
Before we deep dive into the comprehensive guide on what Easy Trade Pro is, let's kick off by showcasing the strategy used in this example. Please note, we have adopted an extremely conservative approach strictly following the Tradingview House Rules, which you can review here: www.tradingview.com
The backtest strategy parameters:
Currency pair: EUR USD
Timeframe: 15-min chart 
Market: Spot, no leverage
Broker: FXCM  
Trading range: 2022-09-01 07:30 — 2023-06-26 20:00
Backtesting range: 2022-08-31 23:00 — 2023-06-26 20:00
Initial Capital: $10,000
Buy Order Size: 20% of the capital, $2,000
Stop Loss: 0.50% 
Sell orders: Four different take profits where we unload the position by 25% each time
Broker Fees: Commission set at 0.08$
Slippage: 10 ticks 
Understanding FXCM Commissions and Setting Realistic Slippage for EUR/USD Spot Trading:
◉I would like to provide some clarity on the commission structure and slippage setting used in the study for trading the EUR/USD pair on the FXCM spot market. Based on the information available, FXCM charges a commission of $4.00 per standard lot (100,000) on both sides of the trade (meaning at open and close) for the EUR/USD pair. Since the study involve an order size of $2,000 USD, which is equivalent to 0.02 lots, the commission fee for one side of the trade (either buying or selling) would be calculated as $4.00 multiplied by 0.02, which is $0.08. This means that for each individual trade, whether it be a buy or sell, the commission fee would be $0.08.
◉As for slippage, it is crucial to account for the inherent uncertainty in the execution price due to market fluctuations. In the forex market, the EUR/USD pair is quoted with a precision of five decimal places, with the smallest price change being a "pipette" (0.00001). Given that slippage can vary based on market conditions, it is considered fair practice to use a slippage of around 10 ticks under normal market conditions for the EUR/USD pair. This allows for a more realistic representation of the execution price, especially in a liquid and fast-moving market such as forex.
More detailed information about FXCM fees structure in the link below:
docs.fxcorporate.com
Enter a Trade conditions:
For our buy order, we utilize a custom buy signal called 'Bullish Reversal'. A detailed explanation of this and other buy orders can be found later in the guide, specifically in section 1). 
To enhance realism in our trading strategy, we have implemented a confirmation mechanism. When utilizing the strategy tester, you have the option to input a value to determine the number of confirmation candles to consider.
For example, if you set the input to 1, the system will check if the next candle following the signal meets the criteria for confirmation. If set to 2, the system will evaluate the second candle, and so on for higher values. The confirmation is determined by comparing the closing or opening price of the selected buy signal candle with the corresponding closing price of the confirmation candle.
In this case we choose as buy signal: 'Bullish Reversal' + 2 candle of confirmation
Exit a trade conditions:
On the sell side, we exit a trade in four different types of sell orders where we take profits. Inside '', you will encounter unique labels attributed to our custom sell signals. A detailed explanation of these sell orders can be found later in the guide, specifically in section 1). We used custom order called:
1TP 'Good Sell'
2TP 'Good Sell'
3TP 'Good Sell'
4TP 'Bearish Reversal' + 4 confirmation candles
Our confirmation logic, for sell signals, is applied only to 'Bearish Reversal' signal. The confirmation is determined by comparing the closing or opening price of the selected  'Bearish Reversal' candle with the corresponding closing price of the confirmation candle. In this case, we wait for the fourth candle from the 'Bearish Reversal' signal to confirm the sell trade.
Protect your capital:
This super-conservative study involves a clear low risk, with the use of $2,000, 20% of our capital. If the stop loss of 0.5% were triggered, we lose 10$, equating to  0.10% of $10,000 - thus affecting only 0.10% of our capital.
Super Conservative Approach & Results:
With 353 closed trades, we achieved a net profit of 2.03%, or $203.34$ relative to our initial $10,000 capital, and a win rate of 73.37%. 
Less Conservative Approach & Results:
We could also consider increasing our risk to 0.5% of our capital per trade. We would maintain our stop loss at 0.50%, but we would need to use all our capital to enter the market. If the stop loss of 0.5% will be triggered, we would lose 50$, equating to  0.5% of $10,000.
In this scenario, our net profit would have increased to 10.15%, equivalent to $1015.
Please be aware:
While fully automated strategies can bring considerable advantages, they are not without their cons. For one, relying solely on an automated system may not take into account the potential confluence of other strategies or indicators, such as the significance of support and resistance zones. These elements often require a more nuanced, human understanding of the markets and cannot always be perfectly replicated by an algorithm.
Additionally, it's essential to remember that a significant percentage of traders are not consistently profitable. As such, prudent risk management, a conservative approach, and acceptance of a reasonable profit are crucial aspects of successful trading. While the allure of high returns can be tempting, the sustainability of your trading strategy should always take precedence. Achieving steady, reliable profits over time often outweighs the appeal of a risky, high-return strategy that could potentially lead to substantial losses.
So, while automation can be a powerful tool in your trading arsenal, it's also important to consider other strategies and factors. Always ensure you're managing your risk effectively and approaching trading with a realistic and informed perspective.
------------------------------------------------------------------------ Why Easy Trade Pro is Original? ----------------------------------------------------------------------------------
We developed Easy Trade Pro as a unique and comprehensive solution, and we decided to protect our code to preserve its originality. We invested significant time and effort into making it a realistic trading strategy simulator. The standout features that set Easy Trade Pro apart include:
☀ Versatile Stop Loss Mechanisms: Stop loss execution can be complex and often requires careful coding to work as intended. In most freely available open-source codes, stop losses are implemented using the Average True Range (ATR). ATR can be beneficial but has limitations:
☁ Lagging Indicator - Like most technical indicators, the ATR is a lagging indicator. This means it is based on past data, and so it may not accurately reflect future market volatility. If market conditions change rapidly, the ATR may not adjust quickly enough, potentially leading to suboptimal stop loss levels.
☁ No Directional Information - The ATR measures volatility, but it does not provide any indication of the direction of the trend. Therefore, it should not be used as a standalone tool for making trading decisions, but should be used in conjunction with other technical analysis tools that can provide directional cues.
☁ Inefficiency in Trending Markets - In strongly trending markets, ATR-based stops can sometimes be too far from the current price level. This could lead to larger losses if the price moves against your trade before hitting the stop loss. On the flip side, in less volatile, sideways markets, an ATR-based stop might be set too close to the entry point, leading to premature stop outs.
☁ Overoptimization Risk - If you're backtesting a trading strategy, there's a risk of overoptimizing your stop loss settings by fine-tuning them to past data. The best ATR multiplier that worked in the past might not necessarily work in the future, leading to potential performance issues.
☀ We countered these by implementing four different types of 'protect the trade' mechanisms:
✔ Fixed Percentage Stop Loss
✔ Trailing Stop Loss
✔ Stop Loss Moved to Entry Upon Reaching Certain Gain
✔ Stop Loss Moved to Entry Upon Reaching First Take Profit Order ("Custom Order").
☀ Dual Exit Strategy: We incorporated two distinct methods of exiting a trade. The first uses our custom signals, while the second triggers exit at a certain percentage of gain.
☀ Multiple Take Profit Orders: You have the flexibility to establish up to four different sell orders. This feature enables you to fractionate your exit strategy according to your needs. You can choose to trigger these fractions based on our custom signals or determine your own exit points by setting targeted gains at a fixed percentage.
☀ Confirmation Candle System: This feature enhances trade precision by requiring confirmation candles after a buy or sell signal. This confirmation, dependent on the next candle's closing price, helps reduce false signals and improves entry and exit points. While our confirmation system is applicable to all custom buy signals, it's solely dedicated for the bearish reversal when it comes to sell signals.
☀ Universal Compatibility: Easy Trade Pro's Strategy Tester works perfectly with any asset class. The code can handle different contract types, including the SPX contracts and fractional assets like Bitcoin. It's optimized to ensure proper execution of trades without rounding issues.
☀ Bullish and Bearish Reversal candles: Our method of detecting these pivotal candles combines conditions from buy and sell signals with pertinent divergences in Price, RSI, and Volume (OBV). The distinguishing factor, however, lies in recognizing significant shifts in market structure and liquidity grabs. To further enhance the credibility of our indicator, we've incorporated Bollinger Bands, serving as an additional layer in spotting potential trend reversals, particularly when aligned with long-wick candlesticks, engulfing patterns, and morning or evening star formations.
☀ Non-Repainting Indicator: Our indicator signals are designed not to repaint. Once a signal appears, it stays fixed, offering a reliable tool for your trading decisions.
==================================================  EXTENSIVE TECHNICAL DESCRIPTION  ====================================================
Easy Trade Pro is versatile, allowing you to analyze market trends  across any financial asset. With its rigorous testing, our tool can be used confidently on any timeframe, from 1D to 1min, whether you prefer longer-term or shorter-term trades. 
Although we recommend trading on timeframes between 1D and 1min, higher timeframes like 1W chart, can also provide broader insights. 
Our study combines a variety of popular technical indicators, such as RSI, Stochastic RSI, MACD, DMI, Bollinger Bands as well as relevant EMAs. On the volume side OBV and MFI. Using a data-driven approach, “Easy Trade Pro” analyzes historical market trends to identify optimal ways to combine these indicators with significant divergences between price and oscillators. On top of that the code considers relevant changes in market structure and liquidity grabs, to generate reliable and accurate signals for potential buy and sell opportunities.
* ☎ --> Please not that MACD, BBs, and EMAs account for a minimal part of our script <--- ☎, If you're looking for a simpler tool, consider checking out our open-source indicator, 'RSI, SRSI, MACD, and DMI cross - Open source code'. You can find it here: 
With our customizable system, traders will be able to identify:
1) Three types of buy signals🐂,💰,💎  and sell signals  🐻,🔨,💀
2) Bullish and bearish reversal candles with support and resistance lines
3) Bull and bear momentum signals
4) A function that utilizes Color bars to identify the strength of the trend
5) Three customizable moving averages 
6) Alerts direct to your email or phone
7) Advanced and customizable settings menu
8) Our software also includes a backtesting system that that allows users to test their trading strategies on historical data, to check how they would have performed in real-world market conditions. This can help refine a trading strategy and make more informed decisions.
------------------------------------------------------------------------------ 1) BUY AND SELL SIGNALS  ---------------------------------------------------------------------------------
Our buy and sell signals are generated using a custom combination of RSI, MFI, and Stochastic RSI levels, as well as relevant MACD and Stochastic RSI crosses. These indicators are carefully analyzed to identify potential trading opportunities and determine optimal entry and exit points for trades.
RSI (Relative strength index) measures the strength of a security's price action, while the SRSI (Stochastic Relative Strength Index) is a momentum oscillator that measures the current price relative to its high and low range over a set period. The Money Flow Index (MFI) is another momentum indicator that uses both price and volume data to measure buying and selling pressure. MACD (Moving Average Convergence Divergence) is a popular technical indicator used in financial markets to analyze price trends and momentum.
▶ With our system, you'll be able to identify three different levels of buy signals:
◉ The first level of buy signal is represented by a 🐂 emoji and is a "Good Buy". This signal indicates a possible buying opportunity. It indicates that could be a good opportunity to enter in a long trade.  It's important to note that, the "Good Buy" signal can sometimes be supplemented with a green "Bull" text and a flag plotshape positioned beneath the signal. In these scenarios, we categorize this as a "Good Buy Bull" signal.
◉ The second level of buy signal is represented by a 💰 emoji and is a "Great Buy". This signal indicates a stronger buying opportunity than the "Good Buy" signal.
◉ The third and strongest buy signal is represented by a 💎 emoji and is an "Incredible Buy". This signal indicates a stronger buying opportunity than the "Good Buy" and "Great Buy" signals
▶ With our system, you'll be able to identify three different levels of sell signals:
◉ On the sell side, the first level is represented by a 🐻 emoji and is a "Good Sell". This signal indicates a possible selling opportunity. It indicates that could be a good opportunity to exit a trade or open a short position. It's important to note that, the "Good Sell" signal can occasionally be accompanied by a red "Bear" text and a flag plotshape positioned beneath the signal. In such instances, we refer to this as a "Good Sell Bear" signal.
◉ The second sell signal is represented by a 🔨 emoji and is a "Great Sell". This signal indicates a stronger selling opportunity than the "Good Sell" signal.
◉ The third and strongest sell signal is represented by a 💀 emoji and is an "Incredible Sell". This signal indicates a stronger selling opportunity than the "Good Sell" and "Great Sell" signals.
------------------------------------------2) "BULLISH AND BEARISH REVERSAL CANDLES PLUS SUPPORT AND RESISTANCE LINES" ------------------------------------------------
Bullish and bearish reversal candles are specific candles that have more probability to reverse the trend.
Our trading indicator is designed to identify bullish and bearish reversal candles. Our method of detecting these pivotal candles combines conditions from buy and sell signals with pertinent divergences in Price, RSI, and Volume (OBV). The distinguishing factor, however, lies in recognizing significant shifts in market structure and liquidity grabs. To further enhance the credibility of our indicator, we've incorporated Bollinger Bands, serving as an additional layer in spotting potential trend reversals, particularly when aligned with long-wick candlesticks, engulfing patterns, and morning or evening star formations.
These candles are represented by blue and orange colors respectively by default. Additionally, the indicator also uses lines that are drawn at either the opening or closing of candles to help identify pivot points of support or resistance. These candles, lines color or shape are customizable in the settings menu.
How can I benefit the most from bullish reversal candles? To make the most of bullish reversal candles, a powerful strategy is:
E.g, 1D chart - Wait for the next 1 or 2 candles to close above the support line linked to the bullish reversal candle. For lower timeframes, it is recommended to wait for 2 or 3 candles before making a trading decision. A good tip is also to look for other signals (confluence), like a buy signal. Traders should decide based on their risk tolerance.
Here below we can see an example of a bullish reversal candle in the BTC/USDT, 1D, chart. The system identify a bullish reversal candle (blue color), the next 2 candles are green and closed above the support blue line, in addition we have other bullish signals (confluence). 
How can I benefit the most from bullish reversal lines? Bullish reversal lines can help traders to identify key level of support and maintain control of their position until a clear break below occurs. 
In the example below we se how the price retrace to the support line:
  
After touching the price bounce up.
  
How can I benefit the most from bearish reversal candles? To make the most of bearish reversal candles, a powerful strategy is:
E.g, 1D chart - Wait for the next 1 or 2 candles to close below the resistance line linked to the bearish reversal candle. For lower timeframes, it is recommended to wait for 2 or 3 candles before making a trading decision. Traders should decide based on their risk tolerance.
Here below we can see an example of a bearish reversal candle in the ETH/USDT, 1D, chart. The system identify a bearish reversal candle (orange color), the next candle is red and closes below the resistance orange line. A good tip is also to look for other signals (confluence), like a sell signal. 
  
How can I benefit the most from bearish reversal lines? Bearish reversal lines can help traders to identify key level of resistance and maintain control of their position until a clear break above occurs. 
In the example below we se how the price bounce back to the resistance line and get rejected.
  
------------------------------------------------------------------------- 3) BULL AND BEAR MOMENTUM SIGNALS -----------------------------------------------------------------------
We analyzed factors such as buy or sell signals, long or short confirmation signals, DMI crossup or crossdown and breaks of market structure (BOS) or change of character (CHoCh) to determine the strength and direction of the trend. These study give us bull trend or bear trend signals that can help traders identify potential trading opportunities and make informed decisions.
These conditions are represented by a green word "BULL" and a flag shape below (bull momentum) and by a red word "BEAR" and a flag shape above (bear momentum) respectively by default. These plots shapes are customizable in the settings menu.
How can I benefit the most from bull momentum signals? To make the most of bull momentum signals, a powerful strategy is:
E.g, 1D chart - Look for confluence. If bull signal comes with a "Good Buy 🐂" in the same candle the signal is more strong. Another good combo is to look for a bullish reversal candle prior or after this signal, usually within a range of 1/2 candles. For lower timeframes, it is recommended to wait 2/3 candles before making a trading decision.
In the picture below we can see an example of a bull momentum signal in the US500, 1D, chart.
How can I benefit the most from bear momentum signals? To make the most of bear momentum signals, a powerful strategy is:
E.g, 1D chart - Look for confluence. If bear signal comes with a "Good Sell 🐻" in the same candle the signal is more strong. Another good combo is to look for a bearish reversal candle prior or after this signal, usually within a range of 1/2 candles. For lower timeframes, it is recommended to wait 2/3 candles before making a trading decision.
In the picture below we can see an example of a bear momentum signal in combo with a sell signal, NETFLIX, 1D, chart. 
-------------------------------------------------------------- 4) "COLOR BARS THAT INDICATE THE STRENGTH OF THE TREND -----------------------------------------------------
This code is responsible for changing the color of the bars on a chart based on certain conditions. The gradient colors are defined for green and red, and the algorithm checks if the current bar is within a certain range of either a bearish reversal or bullish reversal candle and whether the price is above or below certain exponential moving averages or if important break of market structure occurs. 
Ultimately, this feature helps traders visually identify potential trends and market shifts and avoid getting distracted by price fluctuations. Please note that every gradient of color can be customize by the user. We set 3 different bullish colors and 3 different bearish colors.
Below the picture of the settings menu related to the bar color.
----------------------------------------------------------------------5)THREE CUSTOMIZABLE MOVING AVERAGES ----------------------------------------------------------------------
You can choose up to three moving averages, any length and any type like SMA, EMA, WMA, HMA, RMA, SWMA and VWMA. Furthermore, you have the freedom to adjust the color and width of the lines to your preference.
Below the picture of the settings menu related to the moving averages.
----------------------------------------------------------------------6) ALERTS DIRECT TO YOUR EMAIL OR PHONE --------------------------------------------------------------------
Our alert feature sends real-time notifications directly to your email or phone when a signal is generated, allowing you to take immediate action and stay ahead of the market. 
With our system, you first establish your own rules for trading in the strategy tester - this includes your criteria for entering and exiting trades.
Once you've defined these conditions, our system will start sending you alerts. These alerts will be triggered whenever your specified conditions are met. So, if the market matches your 'enter trade' conditions, you'll receive an alert prompting. Similarly, when your 'exit trade' conditions are met, you'll receive another alert.
Remember, these alerts are purely based on the conditions you set. 
Once the condition is met, you will receive alerts directly to your email or phone when enter and exit a trade based on your custom conditions. To make sure you receive these notifications click on notifications tab.
---------------------------------------------------------------7) ADVANCED AND CUSTOMIZABLE SETTINGS MENU----------------------------------------------------------------------
We designed Easy Trade indicators with traders in mind, so it's user-friendly, easy to navigate and users can customize inputs, style, and colors of every feature in the indicator's settings menu.
-----------------------------------------------------------------------8) EASY TRADE PRO - BACKTESTING SYSTEM----------------------------------------------------------------------
Easy Trade Pro features a highly effective and realistic backtesting system, designed to mirror as closely as possible the real-world scenarios of entering and exiting trades. 
Step 1:
Open the settings menu of the Indicator.
Once opened the settings menu click on properties.
Decide on the capital you wish to invest. Choose whether to use contracts or USD and determine the size of your orders. For the sake of realism, we recommend not exceeding 25% of your capital per order. However, if you decide to utilize your entire capital, make sure to adjust your stop loss accordingly. For instance, if you have a capital of 10K and use 10K with a stop loss at 2%, your potential loss would be $200. Conversely, if you use only 2K of your 10K capital with a stop loss at 10%, you would still lose the same 2% of your capital. To make your simulation even more authentic, consider incorporating broker fees or commissions into your calculations. For example, spot market fees are typically around 0.10%. If you're backtesting markets with low liquidity, consider factoring in slippage as well.
Step 2: 
Navigate to the 'Inputs' section and scroll down until you come across 'Backtesting System - Strategy Test'. Once you locate this, click on the box and activate the 'USE STRATEGY SYSTEM' option by checking the tick box.
Also You will then need to set a 'Start Date' and 'End Date', establishing a specific time period during which you wish to test your strategy.
Otherwise you can consider to use the deep backtesting feature. 
Step 3:
It's now time to establish the conditions for entering a trade. You can choose from five different types of custom buy signals: Good Buy, Good Buy Bull, Great Buy, Incredible Buy, and Bullish Reversal. Note that 'Great Buy' and 'Incredible Buy' are rare signals, so we advise against using them frequently in mechanical strategy tests; instead, consider them more for manual live tests. For more consistent results, we recommend using the other buy signals.
After determining your preferred buy signal, you can choose how many confirmation candles you wish to wait for before entering a trade. A 'confirmation' means that if the next candle closes above the opening or closing price of the chosen buy signal, it's considered a confirmation. This could be the opening or closing price, depending on whether the candle is green (close > open) or red.
You can set the number of confirmation candles in different time frames: below 2h, between 2h and 10h, and above 10h.
Step 4:
It's now time to safeguard your trade by managing risk. You can choose to implement a stop loss, expressed in percentage terms, or opt for a trailing stop. A trailing stop is a type of stop loss order that moves with the market price. It is designed to protect gains by enabling a trade to remain open and continue to profit as long as the market price is moving in a favorable direction. However, the trade closes if the market price changes direction by a specified amount (the 'trailing stop distance').
Additionally, you can minimize losses and move the stop loss to your entry point once the price reaches a certain percentage of profit. This strategy can help secure potential gains while limiting the potential for losses.
Step 5:
Now it's time to set the conditions for exiting the trade. You have the option to divide your exit into a maximum of four parts, with each part representing 25% of the position size. For each take profit point, you can choose from three different custom sell signals: Good Sell, Good Sell Bear, and Bearish Reversal.
Similarly, the concept of confirmation candles also applies here, but in this case, the candles are not closing above. A 'confirmation' for a sell signal means that if the next candle closes below the opening or closing price of the selected sell signal, it's considered a confirmation. This could be the opening or closing price, depending on whether the candle is green (open > close) or red (close < open).
So, when you're looking to sell, a confirmation would occur if the next candlestick's closing price is lower than the opening or closing price of the candlestick that triggered the sell signal. This indicates a potential bearish trend, providing the confirmation to execute the sell order.
Additionally, we've introduced a feature that allows you to move your stop loss to the entry point whenever the first take profit (1TP) is reached, which equates to hitting one custom sell signal.
Step 6:
We've also designed an alternative method for taking profits. With this approach, you can choose to exit your position once a fixed percentage gain from the entry point is reached. For instance, you might decide to exit when a 10% profit is achieved. Similarly to the previous method, this approach allows you to choose up to four exit points and determine the proportion of your position you want to close at each stage.
Conclusion:
Easy Trade Pro provides users with various options for entering and exiting trades. To effectively utilize the indicator, we strongly recommend conducting thorough backtesting and considering the results across your preferred trading pairs. It is advisable to analyze a substantial number of trades, ideally exceeding 100 trades, to obtain reliable insights into the indicator's performance. This approach will help you gain a better understanding of how Easy Trade Pro aligns with your trading strategy and objectives.
❗Keep attention❗
It is important to note that no trading indicator or strategy is foolproof, and there is always a risk of losses in trading. While this indicator may provide useful information for making conclusions, it should not be used as the sole basis for making trading decisions. Traders should always use proper risk management techniques and consider multiple factors when making trading decisions.
It is also important to be aware of the limitations of simulated performance results. Hypothetical or simulated results do not represent actual trading, and since trades have not been executed, results may be over- or under-compensated for market factors such as lack of liquidity. Simulated trading programs are also designed with the benefit of hindsight, and no representation is being made that any account will achieve profits or losses similar to those shown. Therefore, our indicators are for informative purposes only and not intended to be used as financial advice.
We encourage traders to use our indicators as part of a well-rounded trading strategy and to always be aware of the risks involved in trading. Remember that past performance is not indicative of future results and always trade responsibly.
Ichimoku + Multi-Trend DashboardIchimoku + Multi-Trend Dashboard
A professional multi-indicator trend analyzer that fuses Ichimoku Cloud with volume, momentum, and price-based confirmations — all visualized in a dynamic dashboard.
🔍 Overview
The OSPL Ichimoku + Multi-Trend Dashboard is a comprehensive market-structure and momentum visualization tool built for serious traders who value clarity, precision, and confirmation.
It combines the powerful Ichimoku Cloud system with VWMA, SuperTrend, RSI, and VWAP to provide a 360-degree view of market direction, trend strength, and trade zones.
This indicator allows traders to instantly read multi-indicator alignment through a color-coded dashboard, helping filter out noise and improve timing for entries and exits.
⚙️ Core Features
🟢 1. Ichimoku Cloud Framework
Displays all major Ichimoku elements: Tenkan-Sen, Kijun-Sen, Senkou Span A & B (Kumo Cloud).
Detects Bullish and Bearish Tenkan-Kijun Crossovers.
Identifies Cloud Trend Bias (price above, below, or inside the Kumo).
Marks Buy / Sell / Wait Zones automatically based on price structure and line alignment.
⚡ 2. Multi-Indicator Confirmation Layer
Enhance trend validation using:
VWMA (Volume-Weighted Moving Average): Measures volume-driven price trend.
SuperTrend: Uses ATR to confirm trend direction and detect reversals.
RSI (Relative Strength Index): Gauges market momentum — above 50 indicates bullish bias, below 50 bearish.
VWAP (Volume-Weighted Average Price): Tracks institutional and fair value price zones.
Each of these indicators contributes to a synchronized dashboard view that instantly reveals market bias.
📊 3. Interactive Dashboard Display
Clean, modern bottom-right table summarizing indicator values and their current trend status.
Color-coded trend map:
🟢 Green = Bullish 🔴 Red = Bearish 🟡 Yellow = Neutral / Wait
Quick visual reference — ideal for active traders who rely on multiple confirmations before taking trades.
🌥 4. Kumo Visualization
Smoothly shaded Ichimoku Cloud fill highlights dominant market phase (bullish or bearish).
Dynamic transition coloring enhances visibility of potential breakouts or reversals.
🎯 How to Use
Use the dashboard as a trend alignment and confirmation tool:
Bullish Confluence Example:
Price above Kumo Cloud
Tenkan-Sen > Kijun-Sen
RSI > 50
SuperTrend below price
VWMA and VWAP trending upward
Bearish Confluence Example:
Price below Kumo Cloud
Tenkan-Sen < Kijun-Sen
RSI < 50
SuperTrend above price
VWMA and VWAP trending downward
When most indicators align in the same direction, the system provides high-probability trade zones.
It can be used across all timeframes, from intraday scalping to multi-day swing trading.
🧩 Why Use This Indicator
✅ Filters false signals by combining multiple trend tools.
✅ Eliminates the need to switch between multiple indicators.
✅ Offers an at-a-glance visual assessment of overall market bias.
✅ Adaptable to any asset: stocks, indices, forex, commodities, or crypto.
✅ Ideal for traders using trend-following, momentum, or confirmation-based strategies.
🧠 Professional Tips
Combine the dashboard signals with price action and volume breakouts for enhanced accuracy.
Use higher timeframe Ichimoku structure as a directional filter (e.g., check the 1-hour trend while trading on 15-minute).
Apply ATR-based stop loss and multi-timeframe confluence to further strengthen entries.
Works exceptionally well with Heikin Ashi candles for smoother visual trends.
💡 Suggested Use Cases
Intraday & Swing Trading
Trend Continuation & Reversal Identification
Multi-Indicator Confirmation System
Dashboard-Style Strategy Testing and Backtesting
⚠️ Disclaimer
This indicator is designed for educational and analytical purposes only.
It is not financial advice and does not guarantee profitability.
Always perform independent analysis and apply prudent risk management before executing trades.
OSPL Ichimoku + Multi-Trend DashboardOSPL Ichimoku + Multi-Trend Dashboard
A professional multi-indicator trend analyzer that fuses Ichimoku Cloud with volume, momentum, and price-based confirmations — all visualized in a dynamic dashboard.
🔍 Overview
The OSPL Ichimoku + Multi-Trend Dashboard is a comprehensive market-structure and momentum visualization tool built for serious traders who value clarity, precision, and confirmation.
It combines the powerful Ichimoku Cloud system with VWMA, SuperTrend, RSI, and VWAP to provide a 360-degree view of market direction, trend strength, and trade zones.
This indicator allows traders to instantly read multi-indicator alignment through a color-coded dashboard, helping filter out noise and improve timing for entries and exits.
⚙️ Core Features
🟢 1. Ichimoku Cloud Framework
Displays all major Ichimoku elements: Tenkan-Sen, Kijun-Sen, Senkou Span A & B (Kumo Cloud).
Detects Bullish and Bearish Tenkan-Kijun Crossovers.
Identifies Cloud Trend Bias (price above, below, or inside the Kumo).
Marks Buy / Sell / Wait Zones automatically based on price structure and line alignment.
⚡ 2. Multi-Indicator Confirmation Layer
Enhance trend validation using:
VWMA (Volume-Weighted Moving Average): Measures volume-driven price trend.
SuperTrend: Uses ATR to confirm trend direction and detect reversals.
RSI (Relative Strength Index): Gauges market momentum — above 50 indicates bullish bias, below 50 bearish.
VWAP (Volume-Weighted Average Price): Tracks institutional and fair value price zones.
Each of these indicators contributes to a synchronized dashboard view that instantly reveals market bias.
📊 3. Interactive Dashboard Display
Clean, modern bottom-right table summarizing indicator values and their current trend status.
Color-coded trend map:
🟢 Green = Bullish 🔴 Red = Bearish 🟡 Yellow = Neutral / Wait
Quick visual reference — ideal for active traders who rely on multiple confirmations before taking trades.
🌥 4. Kumo Visualization
Smoothly shaded Ichimoku Cloud fill highlights dominant market phase (bullish or bearish).
Dynamic transition coloring enhances visibility of potential breakouts or reversals.
🎯 How to Use
Use the dashboard as a trend alignment and confirmation tool:
Bullish Confluence Example:
Price above Kumo Cloud
Tenkan-Sen > Kijun-Sen
RSI > 50
SuperTrend below price
VWMA and VWAP trending upward
Bearish Confluence Example:
Price below Kumo Cloud
Tenkan-Sen < Kijun-Sen
RSI < 50
SuperTrend above price
VWMA and VWAP trending downward
When most indicators align in the same direction, the system provides high-probability trade zones.
It can be used across all timeframes, from intraday scalping to multi-day swing trading.
🧩 Why Use This Indicator
✅ Filters false signals by combining multiple trend tools.
✅ Eliminates the need to switch between multiple indicators.
✅ Offers an at-a-glance visual assessment of overall market bias.
✅ Adaptable to any asset: stocks, indices, forex, commodities, or crypto.
✅ Ideal for traders using trend-following, momentum, or confirmation-based strategies.
🧠 Professional Tips
Combine the dashboard signals with price action and volume breakouts for enhanced accuracy.
Use higher timeframe Ichimoku structure as a directional filter (e.g., check the 1-hour trend while trading on 15-minute).
Apply ATR-based stop loss and multi-timeframe confluence to further strengthen entries.
Works exceptionally well with Heikin Ashi candles for smoother visual trends.
💡 Suggested Use Cases
Intraday & Swing Trading
Trend Continuation & Reversal Identification
Multi-Indicator Confirmation System
Dashboard-Style Strategy Testing and Backtesting
⚠️ Disclaimer
This indicator is designed for educational and analytical purposes only.
It is not financial advice and does not guarantee profitability.
Always perform independent analysis and apply prudent risk management before executing trades.
  [3Commas] Alligator StrategyThe Alligator Strategy 
🔷 What it does: This script implements the Alligator Strategy, a trend-following method created by Bill Williams. It uses three customizable moving averages (SMMAs or RMAs) "Jaws," "Teeth," and "Lips" to identify market trends and potential trade opportunities. Additionally, it includes built-in stop-loss and take-profit options for enhanced risk management.
🔷 Who is it for:
 
 Trend Traders: Those who prefer trading in markets with clear directional movement.  
 Advanced Users: Traders who require customizable tools and dynamic risk management features.  
 Beginners: Accessible to those new to trading, thanks to its intuitive visual representation of trends and pre-configured settings.  
 Bot Users: Supports direct signal integration for bot automation, including entries, take-profits, and stop-losses.
 
🔷 How does it work: The Alligator Jaws, Teeth, and Lips are smoothed moving averages (SMA, EMA, RMA, or WMA) calculated based on the selected source price ( hl2 = (high+low)/2 by default). Their lengths and offsets are customizable:
 
 Jaws: Length 21 , offset 13.  
 Teeth: Length 13, offset 8.  
 Lips: Length 8    , offset 5.  
 
When the lines align and spread apart (e.g., Lips > Teeth > Jaws for an uptrend), the strategy identifies a trending market.
Entry Conditions:  
 
 Long Trades: Triggered when Close > Lips > Teeth > Jaws.  
 Short Trades: Triggered when Close < Lips < Teeth < Jaws.
 
🔷 Why it’s unique:
 
 Customization: Flexible settings for moving average types and lengths to adapt to different market conditions and strategy tester configurations.  
 Built-in Filters: Trend filters that can reduce false signals in certain scenarios, making it more reliable for trending markets.  
 Take Profit and Stop Loss:
   
 Configurable as either percentage-based or dynamic.  
 Stop-loss levels adjust dynamically using the Alligator lines.  
 Fast exit logic moves the stop-loss closer to the price when trades are in profit.  
 
 3Commas Bot Compatibility: Designed for automated trading, allowing traders to configure and execute the strategy seamlessly.
 
🔷 Considerations Before Using the Indicator
🔸Why the Forward Offset: By shifting the averages forward, the Alligator helps traders focus on established trends while filtering out short-term market noise.
The standard configurations of 13-8, 8-5, and 5-3 were selected based on Bill Williams’ studies of market behavior. However, these values can be adjusted to suit different market conditions:
 
 Volatile Markets: Faster settings (e.g., 10-6, 6-4, 3-2) may provide earlier signals.  
 Less Volatile Markets: Slower settings (e.g., 21-13, 13-8, 8-5) can help avoid noise and reduce false signals.
 
🔸Best Timeframes to Use: The Alligator can be applied across all timeframes, but certain timeframes offer better reliability.
   
 Higher Timeframes (H4, D1, W1): Ideal for identifying significant trends and for swing or position trading.  
 Lower Timeframes: Not recommended due to increased noise but may work for scalping with additional confirmation tools.
 
🔸Disadvantages of the Alligator Strategy:
 
 Exhausted Entry Levels: High buying levels or low selling levels can lead to momentum exhaustion and potential pullbacks.  
 False Signals in Ranges: Consolidating markets can produce unreliable signals.  
 Lagging Indicator: As it is based on moving averages, it may delay reacting to sudden price changes.
 
🔸Advantages of the Alligator Strategy:
 
 Trend Focused: Simplifies the identification of trending markets.  
 Noise Reduction: Forward shifts and smoothed averages help filter out short-term price fluctuations.  
 Broad Applicability: Suitable for forex, crypto, stocks, and commodities.
 
🔸Important Considerations: 
While the Alligator Strategy provides a systematic way to analyze markets, it does not guarantee successful outcomes. Results in trading depend on multiple factors, including market conditions, trader discipline, and risk management. Past performance of the strategy does not ensure future success, and traders should always approach the market with caution.
Risk Management: Define stop-loss levels, position size, and profit targets before entering any trade. Be prepared for the possibility of losses and ensure that your approach aligns with your overall trading plan.
🔷 STRATEGY PROPERTIES 
 Symbol: BINANCE:BTCUSDT (Spot).
 Timeframe: 1D (Daily Timeframe).
 Test Period: All historical data available.
 Initial Capital: 10000 USDT.
 Order Size per Trade: 1% of Capital, you can use a higher value e.g. 5%, be cautious that the Max Drawdown does not exceed 10%, as it would indicate a very risky trading approach.
 Commission: Binance commission 0.1%, adjust according to the exchange being used, lower numbers will generate unrealistic results. By using low values e.g. 5%, it allows us to adapt over time and check the functioning of the strategy.
 Slippage: 5 ticks, for pairs with low liquidity or very large orders, this number should be increased as the order may not be filled at the desired level.
 Margin for Long and Short Positions: 100%.
 Indicator Settings:  Default Configuration. 
 Alligator: Source hl2 | Calculation RMA | Jaw 21-13, Teeth 13-8, Lips 8-5.
 Strategy: Long & Short.
 Max Stop Loss per Trade: 10% of Trade Size. 
 Exit trades on opposite signal: Enable.
 Alligator Stop Loss: Enable.
 Alligator Fast Exit: Enable.
 
 
🔷 STRATEGY RESULTS  
 ⚠️ Remember, past results do not guarantee future performance. 
 Net Profit: +355.68 USDT (+3.56%).
 Total Closed Trades: 103.
 Percent Profitable: 47.57%.
 Profit Factor: 1.927.
 Max Drawdown: -57.99 USDT (-0.56%).
 Average Trade: +3.45 USDT (+3.41%).
 Average # Bars in Trades: 16.
 
🔷 HOW TO USE
🔸Adjust the Alligator Settings:  
The default values generally work well: Source hl2 | Calculation RMA | Jaw 21-13, Teeth 13-8, Lips 8-5. However, if you want to use it on timeframes smaller than 4H (4 hours), consider increasing the values to better filter market noise.
 Please review the "Indicator Settings" section for configuration.     
🔸Choose a Symbol that Typically Trends: 
Select an asset that tends to create trends. However, the Strategy Tester results may display poor performance, making it less suitable for sending signals to bots.  
🔸Add Trend Filters:
You can enable trend filters like MA and SuperTrend. By default, these are disabled as they are often unnecessary, but you can experiment with their configuration to see if they optimize the strategy's results.  
 Please review the "Indicator Settings" section for configuration.   
🔸Enable Stop Loss Levels: 
Activate Stop Loss features, such as Stop Loss % or Alligator Stop Loss. If both are enabled, the one closest to the price during the trade will be applied.  
 Please review the "Indicator Settings" section for configuration.   
🔸Enable Take Profit Levels:
Activate Take Profit options, such as Take Profit % or Alligator Fast Exit. If both are enabled, the one that triggers first will be executed.  
 Please review the "Indicator Settings" section for configuration.   
This is an example with the default settings and how Alligator Stop Loss and Alligator Fast Exit are activated:
In this example, we additionally enable the Take Profit at 10%. We can observe that the Alligator Stop Loss is the active one since it is closer to the price. When the price moves 10% in favor or against the trade, the position is closed. Although the Alligator Fast Exit is enabled, it does not activate because the trades are closed beforehand.
🔸Results Review: 
It is important to check the Max Drawdown. This value should ideally not exceed 10% of your capital. Consider adjusting the trade size to ensure this threshold is not surpassed.  
Remember to include the correct values for commission and slippage according to the symbol and exchange where you are conducting the tests. Otherwise, the results will not be realistic.
If you are satisfied with the results, you may consider automating your trades. However, it is strongly recommended to use a small amount of capital or a demo account to test proper execution before committing real funds.
🔸Create alerts to trigger the DCA Bot
 
 Verify Messages: Ensure the message matches the one specified by the DCA Bot.
 Multi-Pair Configuration: For multi-pair setups, enable the option to add the symbol in the correct format.
 Signal Settings: Enable whether you want to receive long or short signals (Entry | TP | SL), copy and paste the the messages for the DCA Bots configured in 3Commas.      
 Alert Setup:       
 
 When creating an alert, set the condition to the indicator and choose "alert() function call only.                
 Enter any desired Alert Name.                                          
 Open the Notifications tab, enable Webhook URL, and paste the Webhook URL from 3Commas.                        
 For more details, refer to the 3Commas section: "How to use TradingView Custom Signals. 
 
 Finalize Alerts: Click Create, you're done! Alerts will now be sent automatically in the correct format to 3Commas.
 
🔷 INDICATOR SETTINGS
🔸Alligator Settings 
 
 MA's source: Source price for Alligator moving averages. 
 MA's Type: Type of calculation for MA's.
 Jaw and Offset: Jaw length and offset to the right.
 Teeth and Offset: Teethlength and offset to the right.
 Lips and Offset: Lips length and offset to the right.  
🔸Alligator Style 
 
 Plot Alligator: Show Alligator Ribbon.
 Plot MA's: Show Alligator MA's.
 Colors: Main and Gradient Colors for Bullish Alligator, Berish Alligator, Neutral Alligator. For gradient colors it is recommended to use an opacity of 15.
 
🔸MA & SuperTrend Filters
 
 MA & Plot: Activate MA Filter and Plot MA on the chart. 
 
 Long Entries: When activated, it will only execute entries if the price is above the MA
 Short Entries: When activated, it will only execute entries if the price is below the MA.
 
 Source: Source price for moving average calculations.
 Length: Candles to be used by the MA calculations.
 Type: Type of calculation for MA.
 Timeframe: Here you can select a larger timeframe for the filter.
 
 
 ST & Plot: Activate SuperTrend Filter and Plot SuperTrend on the chart. 
 
 Long Entries: When activated, it will only execute entries if the price is above the SuperTrend. 
 Short Entries: When activated, it will only execute entries if the price is below the SuperTrend.
 
 Source: Source price for SuperTrend calculations.
 Length: Candles to be used by the SuperTrend calculations.
 Factor: ATR multiplier of the SuperTrend.
 Timeframe: Here you can select a larger timeframe for the filter.
 
🔸Strategy Tester
 
 Strategy: Order Type direction in which trades are executed.
 Take Profit %: When activated, the entered value will be used as the Take Profit in percentage from the entry price level.
 Stop Loss %: When activated, the entered value will be used as the Stop Loss in percentage from the entry price level. If Alligator Stop Loss is activated, the closest one to the price will be used.
 Exit trades on opposite signal: This option closes the trade if the opposite condition is met. For instance, if we are in a long position and a sell signal is triggered, the long position will be closed, and a short position will be opened. The same applies inversely.
 Alligator Stop Loss: In a long trade, the lower part of the Alligator indicator will be used as a dynamic stop loss. Similarly, in a short trade, the upper part of the indicator will be used.
 Alligator Fast Exit: Its purpose is to attempt to protect movements in favor of the trade's direction. In the case of long trades, once the price and the upper part of the Alligator indicator are above the trade's entry price, the stop loss will be moved to the upper part. For short trades, once the price and the lower part of the Alligator indicator are below the trade's entry price, the stop loss will be moved to the lower part of the Alligator indicator.
 Alligator Squeeze Entry: When activated, entries will only be executed if they meet the condition after a neutral zone of the Alligator indicator.
 Alligator Squeeze Exit: When this option is activated, any open trades will be closed when the Alligator indicator enters a neutral mode.
 Use Custom Test Period: When enabled signals only works in the selected time window. If disabled it will use all historical data available on the chart.
 Test Start and End: Once the Custom Test Period is enabled, here you select the start and end date that you want to analyze.
 
🔸3Commas DCA Bot Signals
 
 Check Messages: Enable the table to review the messages to be sent to the bot.
 Entry | TP | SL: Enable this options to send Buy Entry, Take Profit (TP), and Stop Loss (SL) signals to 3Commas.
 Deal Entry and Deal Exit : Copy and paste the message for the deal start signal and close order at Market Price of the DCA Bot you created in 3Commas. This is the message that will be sent with the alert to the Bot, you must verify that it is the same as the 3Commas bot so that it can process properly so that it executes and starts the trade.
 DCA Bot Multi-Pair: You must activate it if you want to use the signals in a DCA Bot Multi-pair in the text box you must enter (using the 3Commas format) the symbol in which you are creating the alert, you can check the format of each symbol when you create the bot.
 
🔷 CONCLUSION
The Alligator Strategy is a valuable tool for identifying potential trends and improving decision-making. However, no trading strategy is foolproof. Careful consideration of market conditions, proper risk management, and personal trading goals are essential. Use the Alligator as part of a broader trading system, and remember that consistent learning and discipline are key to success in trading.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
____________________________________________________________________ 
 The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.
PSE, Practical Strategy EnginePSE, Practical Strategy Engine  
A ready-to-use engine that is simple to connect your indicator to, simple to use, and effective at generating alerts for order-filled events during the real-time candle. 
Great for 
 • Evaluating indicators on important metrics without the need to write a strategy script for backtesting.
• Using indicators with built-in risk management.  
 About The PSE 
This engine accepts entry and exit signals from your indicator to provide trade signals for both long and short positions. The PSE was written for trading Funds  (e.g. ETF’s), Stocks, Forex, Futures, and Cryptocurrencies. The trades on the chart indicate market, limit, and stop  orders. The PSE allows for backtesting of trades along with metrics of performance based on trade-groups with many great features. 
Note: A link to a video of how to connect your indicator(s) to the PSE is provided below.
 Key Features 
Trade-Grp’s
 A Trade-Grp makes up one or more trade positions from the first position entering to the last position exiting. Using Trade-Grp’s instead of positions should help you better assess if the metric results fit your trading style. 
Below are two (2) examples of a Trade-Grp with three (3) positions. 
    
Metrics
 A table of metrics is available if the “Show Metrics Table” checkbox  is enabled on the Inputs tab, but metrics always show in the Data Window. 
Examples of the Metrics Table are shown below. 
    
• ROI (Return on Investment) and CAGR (Compound Annual Growth Rate) are based on the Avg Invest/Trade-Grp and are adjusted for dividends if the “Include Dividends in Profit” checkbox  is enabled.
• Profit/Risked  is based on Trade-Grp’s. Also known as reward/risk, as well as expectancy per amount risked. It determines the effectiveness of your strategy and provides a measure of comparison between your strategies. This is adjusted for dividends if the “Include Dividends in Profit” checkbox is enabled. In the Data Window the color is green when above the breakeven point of making a profit and red when below the breakeven point. In the Table the color is red if below the breakeven point, otherwise it is the default color. For example, using the 3 metrics tables above:
 For every USD risked the profit is 1.709 USD.
For every BTC risked the profit is 0.832 BTC.
For every JPY risked the profit is 0.261 JPY.  
• Winning % is based on Trade-Grp’s. In the Data Window the color is green when above the breakeven point of making a profit and red when below the breakeven point. In the Table the color is red if below the breakeven point, otherwise it is the default color.
 The breakeven point is a relationship between the Profit/Risked and Winning % to indicate system profitability potential. Another way to assess trading system performance. For example, for a low Winning % a high Profit/Risked is needed for the system to be potentially profitable.  
• Profit Factor (PF) is based on Trade-Grp’s. The dividend payment, if any, is not considered in the calculation of a win or loss. The “Include Dividends in Profit Factor” checkbox allows you the option to either include or not include dividends in the calculation of Profit Factor. The default is enabled. 
 Must enable the “Include Dividends in Profit” checkbox to include dividends in PF.  
 Including dividends in PF evaluates the trading strategy with a more overall profitability performance view. 
 Enable/Disable “Include Dividends in Profit Factor” checkbox also affects the Avg Trade-Grp Loss, and thus Equity Loss from ECL and % Equity Loss from ECL. 
• Max Consecutive Losses are based on Trade-Grp’s.
• Nbr of Trade-Grp’s and Nbr of Positions.
 These help you to determine if enough trades have occurred to validate your strategy. The Nbr of Positions is the count of positions on the chart. The TV list of trades in the Strategy Tester  may indicate more than what is actually shown on the chart. The Data Window  includes 'Nbr Strat Tester Trades', which equals the TV listing trades, to help you locate specific trades on the chart.  
• Time in Market (%) is based on Trade-Grp’s and date range selected. 
• Avg Invest/Trade-Grp will indicate the average amount of money invested in a Trade-Grp. This is adjusted for dividends if the “Include Dividends in Profit” checkbox is enabled. 
• Equivalent Consecutive Losses, labeled as Equiv. Cons. Losses (ECL). 
 This value is determined by the Winning % and Nbr of Trade-Grp’s. This simulates the more likely case of a series of losses, then a small win, then another series of losses to form an equivalent consecutive losing streak. To lower the value, increase the Winning %.  
• Equity Loss from ECL is the equity loss from the equivalent consecutive losses.
• %  Equity Loss from ECL is the percent of equity loss from the equivalent consecutive losses.  
Risk Management
 • Pyramid rules enforce and maintain position sizing designated by you on the Inputs tab (% Equity to Risk, Up/Dwn Gap) & Properties tab (number of pyramids, slippage, and commission). 
 A pyramid position will not occur unless both its stop covers the last entry price with gap/slippage and commission cost of previous trade is covered.  If take profit is enabled, a pyramid position will not occur unless commission cost of the trade is covered when take profit target is reached.  
• Position sizing, stop-loss (SL), trailing stop-loss (TSL), and take profit (TP) are used. 
• Wash sale prevention for applicable assets is enforced. Wash  sale  assets include stock and fund (e.g. ETF’s).
• No more than one entry position per candle is enforced .  
 Other Great Features 
 • Losing Trade-Grp’s  indicated at the exit with label text in the color blue. Used to easily find consecutive losses affecting your strategy’s performance. The dividend payment, if any, is not considered in the calculation of a win or loss.
• Position  values can be displayed on the chart. The number format is based on the min tick value, but is limited to 8 decimal places only for display purposes.
• Dividends per share and the amount can be displayed on the chart.
• Hold Days . This is the number of days to hold before allowing the next Trade-Grp. Can be a decimal number. This feature may help those trading on a cash account to avoid any settlement violations when trading the same asset.
• Date Filter. Partition the time when trading is allowed to see if the strategy  works well across the date range selected. The metrics should be acceptable across all four (4) time ranges: entire range, 1st half, IQR  (inter-quartile range), and 2nd half. 
• Price gap amount identification. Used in determining if a pyramid entry may be profitable, and may be used in determining slippage amount to use. 
• When TP is enabled, the PSE will only allow a pyramid position if the potential is profitable based on commission and price gap selected.
• Trade-Grp’s shown in background color: green for long positions and red for short positions.
• The PSE will alert you to update your stop-loss as the market changes if your exchange/broker does not allow for trailing stop-loss orders. Enable this option on the Inputs  tab with Alert Chg TSL.
• The PSE will alert you if your drawdown exceeds Max % Equity Drawdown set on the Inputs  tab. 
• The PSE will send an alert to warn you of an expiring GTC order. 
 Some brokers will indicate the order is GTC, Good 'Till Cancelled, but there really is a time limit on the order and is typically 60-120 days. Therefore, the PSE will alert you if you've been in position for close to 60 days so you can refresh your order. The alert is typically a few days before the 60-day time period.  
• For order fill alerts just use a {{placeholder}} in the Message of the alert. Details on how to enter placeholders is explained below. 
• Identify same bar enter/exit for first entries and pyramids. This is shown in the Data Window as well. This can help you determine what stop-loss % works best for your trading style. 
  
• Leverage trading  information is displayed in the Data Window and applies to Trade-Grps.
 Failed PosSize or Margin (%): Shows a zero if the failed-to-trade position size was less than 1 or shows the margin % which failed to meet the margin requirement set in the Properties tab. A flag will show on the bar where a failed-to-trade occurred. This is only applicable to the first position of a Trade-Grp. Position the cursor over the flag for the value to show in the Data Window. 
     
 Notional Value: total Trade-Grp position size x latest entry price x point value. The equity must be > notional value x margin requirement for a trade to occur.  
 Current Margin (%): must be greater than margin requirement set on the Properties tab in order for a trade to occur.  
 Margin Call Price: when enabled on the Style tab is displayed on both the chart and the Data Window as shown below.
  
 PSE Settings 
Pyramids
 • Pyramiding requires the Stop Method to be set to either TSL or Both (meaning SL & TSL).
• The maximum number of pyramids is determined by the value entered in the Properties tab. 
• Pyramid orders require the enter price to be higher than the previous close for Longs and lower than the previous close for Shorts. 
• Pyramids also require the stop with gap/slippage to be higher than the last entry price for Longs, and lower than the last entry price for Shorts. This covers all previous positions and maintains position sizing.
• When take profit, TP, is enabled, the pyramids also require that they will be profitable when opening a position assuming they will reach TP. This is automatically adjusted by you with the Dwn Gap/Up Gap, Slippage, and Commission settings. 
 Inputs Tab 
General Settings
Color Traded Background
 Enable to change background color where in a trade. Green for long positions and red for short positions. 
Show Losing Trade-Grp
  Enable to show if losing Trade-Grp and is indicated by text in blue color. The last position may be at a loss, but if there was profit for the Trade-Grp, then it will not be shown as a loss .
    
Show Position Values
 Enable to show the currency value of each position in gold color.
  
Include Dividends in Profit
 This feature is only applicable if the asset pays dividends and the time frame period of the chart is 1D or less, otherwise ignored. The PSE assumes dividends are taken as cash and not reinvested. 
Enable to adjust ROI, CAGR, Profit/Risked, Avg Invest/Trade-Grp, and Equity to include dividend payments. This feature considers if you were in position at least one day prior to the ex-dividend date and had not exited until after the ex-dividend date. 
When Show Dividends is enabled it will display the payout in currency/share, as well as the total amount based on the number of shares the position(s) of the Trade-Grp are currently holding. 
  
Include Dividends in Profit Factor
 This checkbox allows you the option to either include or not include dividends in the calculation of Profit Factor. Must enable the “Include Dividends in Profit” checkbox to include dividends in PF. The dividend payment, if any, is not considered in the calculation of a win or loss.  
Show Metrics Table
 Options are font size and table location.  
Alert Failed to Trade
 Enable for the strategy to alert you when a trade did not happen due to low equity or low order size. Applicable only for the first position of a Trade-Grp.  
Trade Direction
 Options are 'Longs Only', 'Both', 'Shorts Only'. 
Hold Days
  This is the number of days to hold before allowing the next Trade-Grp. Applies only to the first trade position of a Trade-Grp. Where a Trade-Grp consists of the first position plus any pyramid positions. 
The value entered will be overwritten to >= 31 to prevent wash sale for applicable assets in the event the last Trade-Grp was a loss. Wash sale assets include stock and fund (i.e. ETF’s).
The minimum value is the equivalent of 1 candle and is automatically assigned by the PSE if the entered value is equivalent to less than one candle. To calculate Hold Days in # of candles on the Hour chart divide the chart period by 24 x #candles. On the Minute chart divide the chart period by 60 then by 24 x #candles.  
Show Vertical Lines at From Date & To Date
 Shows a vertical dotted line at the From Date and To Date for visual inspection of the setting. 
Date Filter
 When enabled, trades are allowed between the From Date and To Date, i.e., the date range.
When disabled, trades are allowed for all candles. 
Partition the time when trading is allowed to see if your indicator settings work well across the date range. Click 1st Half, IQR (inter-quartile range), or 2nd Half buttons to trade a portion of the date range.
Select only one at-a-time to partition the time when trading is allowed.
 When 1st Half is enabled only trades for the 1st half of the date range are allowed.   
 When IQR is enabled only trades for the inter-quartile date range are allowed.  
 When 2nd Half is enabled only trades for the 2nd half of the date range are allowed.    
Position Sizing
 The % of Equity to Risk has been separated into two (2) areas: for initial trades and for pyramid trades. This allows for greater ability to maximize profits within your acceptable drawdown. A variation of the Anti-Martingale method from the initial trade if you choose to use it in that manner.
 % Equity to Risk for Initial Trades: enter the percent of equity you want to risk per position for the initial trades of each Trade-Grp. For example, for 1% enter 1.  
 % Equity to Risk for Pyramid Trades: enter the percent of equity you want to risk per position for the pyramid trades of each Trade-Grp. For example, for 2% enter 2.  
 % Equity for Max Position Size: the position size will not exceed this amount. For example, for 25% enter 25.  
 Max % Equity Drawdown Warning: an alert will be triggered if the maximum drawdown exceeds this v alue. For example, for 10% enter 10.    
Stop Methods
  
NOTE: The Stop Method must be either Both or TSL in order for the pyramids to work. This feature enforces position sizing.
Stop-loss, SL, and trailing stop-loss, TSL, are other features that enforce risk management. 
The trailing stop-loss, TSL, is activated immediately if Stop Method = TSL. If Stop Method = Both, then the TSL is activated when its value is above stop-loss, SL, for Longs and below the SL for Shorts. 
The calculated TSL value (shown on the chart by + symbol) of the previous bar is used for the current bar and the plot value is off by default, but you can it turn on via the Style tab. This is available so you can better understand how the TSL value used was calculated from. It is beneficial to show when monitoring the real-time candle. 
  
Alert Chg TSL
 When enabled, this feature will alert you to update your stop price if it moves greater than the change amount in %. The amount is the absolute % so will work for both Longs and Shorts. For example, for 1% enter 1 . This is provided since some exchanges/brokers do not offer TSL orders and you must manually adjust as price action plays out.
The alert will also suggest a stop limit price based on the gap selected and explained below. 
The alert will occur at the close of the candle at the calculated TSL value of the candle just prior to the real-time candle. 
Dwn Gap/Up Gap Input Settings
 A price gap is the difference between the closing price of the previous candle and the opening price of the current candle. Dwn Gap and Up Gap are illustrated here. 
  
The values of the Dwn Gap and Up Gap can be seen in the Data Window  and are based on the settings of the Date Filter.
  
The options are “zero gap”, "median gap", "avg gap", "80 pct gap", "90 pct gap". The X pct gap stands for X percentile rank. For example, "80 pct gap" means that 80% of the gaps are less than or equal to the value shown in the Data Window. Select “zero gap” to disable this feature.
If Show Stop Limit is enabled, it will show a dotted-line below or above the current stop price where a stop-limit order should be taken. It is shown based on the gap option selected. Again, the PSE trades market, limit, and stop  orders, but a stop-limit may be shown if you wanted to see where one would be set using the Up/Dwn Gap.
 Dwn Gap: Affects Short Take Profit, Long Pyramid Entries, and to show the Long Stop Limit.  
 Up Gap : Affects Long Take Profit, Short Pyramid Entries, and to show the Short Stop Limit.    
Fixed Take Profit (TP)
  When take profit (TP) is enabled, the PSE will determine if opening a pyramid position will be in profit assuming the TP will be hit while considering commission costs (on Properties tab).  
 The larger of Up Gap or Slippage value is used with Long positions regarding TP. 
 The larger of Dwn Gap or Slippage value is used with Short positions regarding TP. 
 Properties Tab 
• Initial Capital: Set as desired.
• Base Currency: Leave as Default. The PSE is designed to use the instrument’s currency, therefore leave as Default.
• Order Size: Leave as default. This setting has been disabled and position sizing is handled on the Inputs  tab and is based on % of equity.  
• Pyramiding: Set as desired.
• Commission: Set as number %. The PSE is designed to only work with commission as a percent of the position value.
• Verify Price for Limit Orders: Set as desired.
Slippage
 Adjust Slippage on the Properties tab to account for a realistic bid-ask spread. You can use one of Dwn/Up Gap values or other guidelines. Again, the Dwn/Up Gap values are based on the Date Filter input settings.
Heed warnings from the TradingView Pine Script™ manual about values entered into the Slippage field. 
The Slippage (ticks) have a noticeable influence on entry price and exit price especially at the beginning when the date range includes prices from $0.01 to $100,000.00 like that for BTC-USD INDEX.  When this is the case, it is best to use different slippage values when partitioning time with the Date Filter. 
To minimize the effects of slippage, yet account for it select ‘median gap’ on the Input Tab and use that value for slippage on the Properties tab. 
The slippage value is included in the placeholder {{strategy.order.price}}.  
Leverage Trading 
 The PSE is designed to be used both without leverage (the default) and with leverage. 
These two settings apply to Trade-Grps. For example, for 5x leverage enter 20 (1/5x100=20).
 Margin for Long Positions: Set as desired. The default is 100%.
Margin for Short Positions: Set as desired. The default is 100%. 
This setting on the Inputs tab applies to each trade position within a Trade-Grp.  
 Max % Equity per Position: Set as desired. The default is 20% and intended for non-leverage trading. For leverage trading set as desired. For example, for 3x leverage enter 300 (3x100=300).    
Recalculate After Order Is Filled
 The PSE uses the strategy parameter calc_on_order_fills=true to allow for enter/exit on the same bar and generate alerts immediately after an order is filled. This parameter is on the Properties tab and is named ‘Recalculate After order is filled’ and is enabled by default. 
Disabling this feature will cause the PSE to not work as intended. 
You will see the following Caution! on the TV Strategy Tester
   
This occurs because the PSE has the strategy parameter calc_on_order_fills = true. 
Again, the PSE will only work as intended if this parameter is enabled and set to true. 
Therefore, you can close the caution sign and be confident of receiving realistic results. 
Recalculate On every tick: Disable.
Fill Orders
 • Using bar magnifier: Set as desired.
• On Bar Close: Disable. The PSE will not work as intended if this is enabled.
• Using Standard OHLC: Set as desired. 
 Using The Alert Message Box From TV Strategy Alert 
  Set alerts to gain access to all the alerts from PSE. This allows for both order filled alerts, as well as the alert function calls related to refresh GTC orders, drawdown exceeded, update stop-loss order, and Failed to Trade.  
   
Example Message for Manual Trading Alerts
(This is just an example. Consult TV manual for possible placeholders to use.)
 {
Alert for {{plot("position_for_alert")}} position. (long = 1; short = -1)
{{exchange}}:{{ticker}} on TF of {{interval}} at Broker Name
{{strategy.order.action}} Equity x Equity_Multiplier USD in shares at price = {{strategy.order.price}},
where Equity_Multiplier = {{strategy.order.contracts}} x  {{strategy.order.price}} / {{plot("Equity")}}
or {{strategy.order.action}}  {{strategy.order.contracts}} shares at price = {{strategy.order.price}}. 
}
Note: Use the Equity x Equity_Multiplier method if you have several accounts with different initial capital. 
Example Message for Bot Trading Alerts
(You must consult your specific bot for configuring the alert message. This is just an example.)
 {
"action": "{{strategy.order.action}}",
“price”: {{strategy.order.price}}
"amount": {{strategy.order.contracts}},
"botId": "1234"
} 
 Connecting to the PSE 
 The diagram below illustrates how to connect indicators to the PSE. 
The Aroon and MACD indicators are only used here as an example. Substitute your own indicators and add as many as you like. 
  
Connection Indicator for the PSE
 A video of how to connect your indicator(s) to the PSE is below.
  
The Connection Indicator for the PSE, also called here the connection-indicator.
Below is a description of how to connect your chosen indicators to the connection-indicator. Two (2) indicators were chosen for the example, but you may have one (1) or many indicators. 
If you have source code access to your indicators you can paste the code directly into the connection-indicator to eliminate the need to have those indicators on the chart and the additional connection of them to the connection-indicator. Below will assume source code to the indicators are not available.
The MACD and Aroon Oscillator are from TV built standard indicators and are shown here just as an example for inputs (i.e. source) to the connection-indicator. They were configured as follows:
  
  
The source code for the connection-indicator is shown below. Substitute your own chosen indicators and add as many as you like to create your connection-indicator that feeds into the PSE. The MACD and Aroon Oscillator were simply chosen as an example. Configure your connection-indicator in the manner shown below. 
 // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at  mozilla.org 
// This is just an example Indicator to show how to interface with the PSE. 
// The indicators used in the example are standard TV built indicators. 
//@version=5
indicator(title="Connection Indicator for the PSE", overlay=false, max_lines_count=500, max_labels_count=500, max_boxes_count=500)
// Ind_1 INDICATOR ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// This is just and example and used MACD histogram as the source. 
Filter_Ind_1 = input.bool(false, 'Ind_1', group='Ind_1 INDICATOR ~~~~~~~~~~~~~~~~~', tooltip='Click ON to enable the indicator')
input_Ind_1 = input.source(title = "input_Ind_1", defval = close, group='Ind_1 INDICATOR ~~~~~~~~~~~~~~~~~')
Entry_Ind_1_Long = Filter_Ind_1 ? input_Ind_1 > 0 ? 1 : 0 : 0
Entry_Ind_1_Short = Filter_Ind_1 ? input_Ind_1 < 0 ? 1 : 0 : 0
Exit_Ind_1_Long = Entry_Ind_1_Short
Exit_Ind_1_Short = Entry_Ind_1_Long
// Ind_2 INDICATOR ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// This is just an example and used Aroon Oscillator as the source. Included limits to use with the oscillator to determine enter and exit.
Filter_Ind_2 = input.bool(false, "Ind_2", group='Ind_2 INDICATOR ~~~~~~~~~~~~~~', tooltip='Click ON to enable the indicator')
Filter_Ind_2_Limit = input.int(35, minval=0, step=5, group='Ind_2 INDICATOR ~~~~~~~~~~~~~~')
Filter_Ind_2_UL = Filter_Ind_2_Limit
Filter_Ind_2_LL = -Filter_Ind_2_Limit
up = input.source(title = "input_Ind_2A Up", defval = close, group='Ind_2 INDICATOR ~~~~~~~~~~~~~~')
down = input.source(title = "input_Ind_2B Down", defval = close, group='Ind_2 INDICATOR ~~~~~~~~~~~~~~')
oscillator = up - down
Entry_Ind_2_Long = Filter_Ind_2? oscillator > Filter_Ind_2_UL ? 1 : 0 : 0
Entry_Ind_2_Short = Filter_Ind_2? oscillator < Filter_Ind_2_LL ? 1 : 0 : 0
Exit_Ind_2_Long = Entry_Ind_2_Short
Exit_Ind_2_Short = Entry_Ind_2_Long
//#region ~~~~~~~ASSEMBLY OF FILTERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
// You may have as many indicators as you like. Assemble them in similar fashion as below. 
// ——————— Assembly of Entry Filters
Nbr_Entries = input.int(1, minval=1, title='Min Nbr Entries', inline='nbr_in_out', group='Assembly of Indicators')
// Update the assembly based on the number of indicators connected.
EntryLongOK = Entry_Ind_1_Long + Entry_Ind_2_Long >= Nbr_Entries? true: false
EntryShortOK = Entry_Ind_1_Short + Entry_Ind_2_Short >= Nbr_Entries? true: false
entry_signal = EntryLongOK ? 1 : EntryShortOK ? -1 : 0
plot(entry_signal, title="Entry_Signal", color=color.new(color.blue, 0))
// ——————— Assembly of Exit Filters
Nbr_Exits = input.int(1, minval=1, title='Min Nbr of Exits', inline='nbr_in_out', group='Assembly of Indicators', tooltip='Enter the minimum number of entries & exits 
 required for a signal.')
// Update the assembly based on the number of indicators connected.
ExitLongOK = Exit_Ind_1_Long + Exit_Ind_2_Long >= Nbr_Exits? true: false
ExitShortOK = Exit_Ind_1_Short + Exit_Ind_2_Short >= Nbr_Exits? true: false
exit_signal = ExitLongOK ? 1 : ExitShortOK ? -1 : 0
plot(exit_signal, title="Exit_Signal", color=color.new(color.red, 0))
//#endregion ~~~~~~~END OF ASSEMBLY OF FILTERS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
 
The input box for the connection-indicator is shown below. The default for input source is “close”. For Input_Ind_1 click the dropdown and select the MACD Histogram. For Input_Ind_2 click the dropdown and select Aroon Up and Aroon Down as shown.
  
 
 Signal Connection Section of PSE 
 Below is a description of how to connect your chosen indicators to the PSE from the connection-indicator.
At the PSE Input tab, the Signal Connection Section is where you select the source of the Entry and Exit Signal to the PSE. These are the outputs from connection-indicator. 
The default source is “close”. Click the dropdown and select the entry and exit signal to establish a connection as shown below.
  
AutoPilot | FractalystWhat’s the purpose of this indicator? 
The AutoPilot indicator automates the management of your active trades by:
 Breaks Even:  Moves the stop-loss to the entry price once the trade reaches a 1:1 risk-reward ratio.
  
 Closes Trades:  Automatically exits trades when trailing stop-losses are triggered.
  
This automation is facilitated through PineConnector and TradingView webhook integration, allowing traders to manage multiple positions across various markets effortlessly without any manual intervention.
  
----
 How does this indicator trail stop-loss using market structure? 
The AutoPilot indicator utilizes an advanced market structure trailing stop-loss mechanism to manage trades based on market dynamics and probabilities.
  
Here's how it works:
 Market Structure Identification:  The indicator first identifies key market structures such as higher highs, lower lows.
These structures are pivotal points where the market has shown a change in direction or momentum.
  
 Probability-Based Trailing:  Once a trade is active, the stop-loss isn't just set at a fixed distance or percentage but is dynamically adjusted based on the probability of the market structure holding or breaking.
This involves:
 Trend Continuation Probability:  If the market structure suggests a strong trend continuation (e.g., a series of higher highs in an uptrend), the stop-loss might trail closer to the price, but with a buffer calculated by the probability of the trend continuing versus reversing.
 Reversal Probability:  Conversely, if there's a high probability of a trend reversal based on recent market structures (like a significant lower high in an uptrend), the stop-loss might be adjusted to a point where the market structure would need to break to confirm the reversal, thus protecting potential profits or minimizing losses.
 Dynamic Adjustment:  The trailing stop-loss adjusts in real-time as new market structures form. For instance, if a new higher high is formed in an uptrend, the stop-loss might move up but not necessarily to the exact previous swing low. Instead, it's placed at a level where the probability of the next swing low not breaking this level is high, based on historical price action.
 Risk Management:  By using market structure and probabilities, the indicator aims to balance between giving the trade room to breathe (allowing for normal market fluctuations) and tightening the stop-loss when the market behavior suggests a potential trend change or continuation with high confidence.
This approach ensures that the stop-loss isn't just a static or simple trailing mechanism but a sophisticated tool that adapts to the evolving market conditions, aiming to maximize profit while minimizing the risk of being stopped out prematurely due to market noise.
----
 How are the probabilities calculated? What are the underlying calculations? 
The probability is designed to enhance trade management by using buyside liquidity and probability analysis to filter out low/high probability conditions.
This helps in identifying optimal trailing points where the likelihood of a price continuation is higher.
Calculations:
1. Understanding Swing highs and Swing Lows
Swing High: A Swing High is formed when there is a high with 2 lower highs to the left and right.
Swing Low: A Swing Low is formed when there is a low with 2 higher lows to the left and right.
2. Understanding the purpose and the underlying calculations behind Buyside, Sellside and Equilibrium levels.
  
3. Understanding probability calculations
1. Upon the formation of a new range, the script waits for the price to reach and tap into equilibrium or the 50% level. Status: "⏸" - Inactive
2. Once equilibrium is tapped into, the equilibrium status becomes activated and it waits for either liquidity side to be hit. Status: "▶" - Active
3. If the buyside liquidity is hit, the script adds to the count of successful buyside liquidity occurrences. Similarly, if the sellside is tapped, it records successful sellside liquidity occurrences.
5. Finally, the number of successful occurrences for each side is divided by the overall count individually to calculate the range probabilities.
  
Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity.
  
----
 What does the automation table display? 
The automation table in the AutoPilot indicator provides a summary of user-defined settings crucial for automated trade management through PineConnector and TradingView integration. It displays:
 PineConnector License ID:  This ensures that the indicator is linked to your specific PineConnector account, allowing for personalized and secure automation of your trades.
 Order Type (Buy/Sell):  Indicates whether the automation is set for buying or selling, which is essential for correctly executing your trading strategy.
 Chosen Symbol:  Specifies the trading pair or symbol in your broker's platform where the trade management commands (like closing orders) will be executed. This ensures that the automation targets the correct market or asset.
 Risk Per Trade:  Shows the percentage or amount of your capital you're willing to risk on each trade, helping you maintain consistent risk management across different trades.
Comment: A field for you to input notes or identifiers, particularly useful when trading across multiple markets or instruments. This helps in tracking and managing trades across different assets or strategies.
 Comment:  A field for you to input identifiers, particularly useful when trading across multiple timeframes or different enries.
Allowing users to manage specific comments for each previously taken entry, facilitating precise management of multiple trades with unique identifiers.
This table serves as a quick reference for your current settings, ensuring you're always aware of how your trades are being managed automatically before any adjustments are made or alerts are triggered.
----
 How to use the indicator? 
To use the AutoPilot indicator:
 Purchase a License ID:  Acquire a license ID from PineConnector.
 Setup PineConnector EA:  Install and configure the PineConnector Expert Advisor on your MetaTrader platform.
 Input Settings:  Enter your PineConnector license ID, choose the order type, set your risk per trade, add the order comment, and select the trading symbol in the indicator's settings.
 Create Alert:  Right-click on the automation table, and set up an alert with the provided webhook to connect with PineConnector.
 Automatic Management:  Once set, your active trades will be automatically managed according to the alert conditions you've set.
This setup ensures your trades are managed seamlessly without constant manual intervention.
----
 What makes this indicator original? 
 Integration with PineConnector:  The AutoPilot indicator's originality lies in its integration with PineConnector, which allows for real-time trade management directly from TradingView to your MetaTrader platform. This setup is unique as it combines the analytical capabilities of TradingView with the execution capabilities of MetaTrader through a custom indicator, providing a seamless bridge between analysis and action.
 Market Structure-Based Trailing Stop-Loss:  Unlike many indicators that might use fixed percentages or ATR (Average True Range) for stop-loss adjustments, the AutoPilot indicator uses market structure (higher highs, lower lows) to dynamically adjust the stop-loss.
 Probability-Based Adjustments:  The indicator doesn't just trail stop-losses based on price but incorporates the probability of market structure holding or breaking. This probability-based trailing mechanism is innovative, aiming to balance between giving trades room to breathe and tightening when market behavior suggests a potential reversal or continuation.
 Customizable Automation Table:  The automation table within the indicator allows for detailed customization, including setting specific comments for trades. This feature, while perhaps not unique in concept, is original in its implementation within trading indicators, providing users with a high degree of control and personalization over trade management.
 Real-Time Trade Management Alerts:  The ability to set up alerts directly from the indicator to manage trades in real-time via webhooks to PineConnector adds a layer of automation that's not commonly found in standard trading indicators. This real-time connection for trade management enhances its originality by reducing the lag between analysis and trade execution.
 User-Centric Design:  The design of the AutoPilot indicator focuses heavily on user interaction, allowing for inputs like risk per trade, specific order types, and comments. This user-centric approach, where the indicator adapts to the trader's strategy rather than the trader adapting to the tool, sets it apart.
 External Integration for Enhanced Functionality:  By leveraging external services like PineConnector for execution, the indicator extends its functionality beyond what's typically possible within TradingView alone, making it original in its ecosystem integration for trading purposes.
 Practical Implication:  This means if you're in a trade and the market structure suggests the trend is continuing (e.g., making higher highs in an uptrend), your stop-loss might trail closer to the price but not too close to avoid being stopped out by normal fluctuations. If the structure breaks (e.g., a lower high in an uptrend), the stop-loss could adjust more aggressively to protect profits or minimize losses, anticipating a potential trend change.
This combination of features creates an original tool that not only analyzes market conditions but actively manages trades based on sophisticated market structure analysis.
----
 User-input settings and customizations 
  
----
 Terms and Conditions | Disclaimer 
 Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data. By utilizing our charting tools, the buyer acknowledges that neither the seller nor the creator assumes responsibility for decisions made using the information provided. The buyer assumes full responsibility and liability for any actions taken and their consequences, including potential financial losses. Therefore, by purchasing these charting tools, the customer acknowledges that neither the seller nor the creator is liable for any unfavorable outcomes resulting from the development, sale, or use of the products. 
The buyer is responsible for canceling their subscription if they no longer wish to continue at the full retail price. Our policy does not include reimbursement, refunds, or chargebacks once the Terms and Conditions are accepted before purchase. 
 
 By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer.
AlgoBuilder [Trend-Following] | FractalystWhat's the strategy's purpose and functionality? 
This strategy is designed for both traders and investors looking to rely on and trade based on historical and backtested data using automation. The main goal is to build profitable trend-following strategies that outperform the underlying asset in terms of returns while minimizing drawdown. For example, as for a benchmark, if the S&P 500 (SPX) has achieved an estimated 10% annual return with a maximum drawdown of -57% over the past 20 years, using this strategy with different entry and exit techniques, users can potentially seek ways to achieve a higher Compound Annual Growth Rate (CAGR) while maintaining a lower maximum drawdown.
Although the strategy can be applied to all markets and timeframes, it is most effective on stocks, indices, future markets, cryptocurrencies, and commodities and JPY currency pairs given their trending behaviors.
In trending market conditions, the strategy employs a combination of moving averages and diverse entry models to identify and capitalize on upward market movements. It integrates market structure-based trailing stop-loss mechanisms across different timeframes and provides exit techniques, including percentage-based and risk-reward (RR) based take profit levels.
Additionally, the strategy has also a feature that includes a built-in probability and sentiment function for traders who want to implement probabilities and market sentiment right into their trading strategies.
Performance summary, weekly, and monthly tables enable quick visualization of performance metrics like net profit, maximum drawdown, compound annual growth rate (CAGR), profit factor, average trade, average risk-reward ratio (RR), and more. This aids optimization to meet specific goals and risk tolerance levels effectively.
-----
 How does the strategy perform for both investors and traders? 
The strategy has two main modes, tailored for different market participants: Traders and Investors.
 Trading: 
 1. Trading (1x): 
- Designed for traders looking to capitalize on bullish trending markets.
- Utilizes a percentage risk per trade to manage risk and optimize returns.
- Suitable for active trading with a focus on trend-following and risk management.
- (1x) This mode ensures no stacking of positions, allowing for only one running position or trade at a time.
  
◓: Mode | %: Risk percentage per trade
 2. Trading (2x): 
Similar to the 1x mode but allows for  two pyramiding entries. 
This approach enables traders to increase their position size as the trade moves in their favor, potentially enhancing profits during strong bullish trends.
  
◓: Mode | %: Risk percentage per trade
 3. Investing: 
- Geared towards investors who aim to capitalize on bullish trending markets without using leverage while mitigating the asset's maximum drawdown.
- Utilizes 100% of the equity to buy, hold, and manage the asset.
- Focuses on long-term growth and capital appreciation by fully investing in the asset during bullish conditions.
  
- ◓: Mode | %: Risk not applied (In investing mode, the strategy uses 100% of equity to buy the asset)
-----
 What's the purpose of using moving averages in this strategy? What are the underlying calculations? 
Using moving averages is a widely-used technique to trade with the trend. 
The main purpose of using moving averages in this strategy is to filter out bearish price action and to only take trades when the price is trading  ABOVE  specified moving averages. 
The script uses different types of moving averages with user-adjustable timeframes and periods/lengths, allowing traders to try out different variations to maximize strategy performance and minimize drawdowns. 
By applying these calculations, the strategy effectively identifies bullish trends and avoids market conditions that are not conducive to profitable trades.
The MA filter allows traders to choose whether they want a specific moving average above or below another one as their entry condition.
This comparison filter can be turned on (>/<) or off.
For example, you can set the filter so that MA#1 > MA#2, meaning the first moving average must be above the second one before the script looks for entry conditions. This adds an extra layer of trend confirmation, ensuring that trades are only taken in more favorable market conditions.
  
MA #1: Fast MA | MA #2: Medium MA | MA #3: Slow MA
⍺: MA Period | Σ: MA Timeframe
-----
 What entry modes are used in this strategy? What are the underlying calculations? 
The strategy by default uses two different techniques for the entry criteria with user-adjustable left and right bars: Breakout and Fractal.
1.  Breakout Entries :
   - The strategy looks for pivot high points with a default period of 3.
   - It stores the most recent high level in a variable.
   - When the price crosses above this most recent level, the strategy checks if all conditions are met and the bar is closed before taking the buy entry.
  
◧: Pivot high left bars period | ◨: Pivot high right bars period
2.  Fractal Entries :
   - The strategy looks for pivot low points with a default period of 3.
   - When a pivot low is detected, the strategy checks if all conditions are met and the bar is closed before taking the buy entry.
  
◧: Pivot low left bars period | ◨: Pivot low right bars period
By utilizing these entry modes, the strategy aims to capitalize on bullish price movements while ensuring that the necessary conditions are met to validate the entry points.
-----
 What type of stop-loss identification method are used in this strategy? What are the underlying calculations? 
 Initial Stop-Loss: 
1. ATR Based:
   The Average True Range (ATR) is a method used in technical analysis to measure volatility. It is not used to indicate the direction of price but to measure volatility, especially volatility caused by price gaps or limit moves.
Calculation:
     - To calculate the ATR, the True Range (TR) first needs to be identified. The TR takes into account the most current period high/low range as well as the previous period close.
The True Range is the largest of the following:
     - Current Period High minus Current Period Low
     - Absolute Value of Current Period High minus Previous Period Close
     - Absolute Value of Current Period Low minus Previous Period Close
     - The ATR is then calculated as the moving average of the TR over a specified period. (The default period is 14).
Example - ATR (14) * 1.5
  
⍺: ATR period | Σ: ATR Multiplier
2. ADR Based:
The Average Day Range (ADR) is an indicator that measures the volatility of an asset by showing the average movement of the price between the high and the low over the last several days.
Calculation:
     - To calculate the ADR for a particular day:
     - Calculate the average of the high prices over a specified number of days.
     - Calculate the average of the low prices over the same number of days.
     - Find the difference between these average values.
     - The default period for calculating the ADR is 14 days. A shorter period may introduce more noise, while a longer period may be slower to react to new market movements.
Example - ADR (14) * 1.5
  
⍺: ADR period | Σ: ADR Multiplier
Application in Strategy:
- The strategy calculates the current bar's ADR/ATR with a user-defined period.
- It then multiplies the ADR/ATR by a user-defined multiplier to determine the initial stop-loss level.
By using these methods, the strategy dynamically adjusts the initial stop-loss based on market volatility, helping to protect against adverse price movements while allowing for enough room for trades to develop.
 Trailing Stop-Loss: 
One of the key elements of this strategy is its ability to detec buyside and sellside liquidity levels across multiple timeframes to trail the stop-loss once the trade is in running profits.
By utilizing this approach, the strategy allows enough room for price to run. 
There are two built-in trailing stop-loss (SL) options you can choose from while in a trade:
1. External Trailing Stop-Loss:
   - Uses sell-side liquidity to trail your stop-loss, allowing price to consolidate before continuation. This method is less aggressive and provides more room for price fluctuations.
Example - External - Wick below the trailing SL - 12H trailing timeframe
  
⍺: Exit type | Σ: Trailing stop-loss timeframe
2. Internal Trailing Stop-Loss:
   - Uses the most recent swing low with a period of 2 to trail your stop-loss. This method is more aggressive compared to the external trailing stop-loss, as it tightens the stop-loss closer to the current price action.
Example - Internal - Close below the trailing SL - 6H trailing timeframe
  
⍺: Exit type | Σ: Trailing stop-loss timeframe
Each market behaves differently across various timeframes, and it is essential to test different parameters and optimizations to find out which trailing stop-loss method gives you the desired results and performance.
-----
 What type of break-even and take profit identification methods are used in this strategy? What are the underlying calculations? 
For Break-Even:
- You can choose to set a break-even level at which your initial stop-loss moves to the entry price as soon as it hits, and your trailing stop-loss gets activated (if enabled).
- You can select either a percentage (%) or risk-to-reward (RR) based break-even, allowing you to set your break-even level as a percentage amount above the entry price or based on RR.
For TP1 (Take Profit 1):
- You can choose to set a take profit level at which your position gets fully closed or 50% if the TP2 boolean is enabled.
- Similar to break-even, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP1 level as a percentage amount above the entry price or based on RR.
For TP2 (Take Profit 2):
- You can choose to set a take profit level at which your position gets fully closed.
- As with break-even and TP1, you can select either a percentage (%) or risk-to-reward (RR) based take profit level, allowing you to set your TP2 level as a percentage amount above the entry price or based on RR.
The underlying calculations involve determining the price levels at which these actions are triggered. For break-even, it moves the initial stop-loss to the entry price and activate the trailing stop-loss once the break-even level is reached.
For TP1 and TP2, it's specifying the price levels at which the position is partially or fully closed based on the chosen method (percentage or RR) above the entry price. 
These calculations are crucial for managing risk and optimizing profitability in the strategy.
  
⍺: BE/TP type (%/RR) | Σ: how many RR/% above the current price
-----
 What's the ADR filter? What does it do? What are the underlying calculations? 
The Average Day Range (ADR) measures the volatility of an asset by showing the average movement of the price between the high and the low over the last several days.
 The period of the ADR filter used in this strategy is tied to the same period you've used for your initial stop-loss. 
Users can define the  minimum ADR  they want to be met before the script looks for entry conditions.
ADR Bias Filter:
- Compares the current bar ADR with the ADR (Defined by user):
- If the current ADR is higher, it indicates that volatility has increased compared to ADR (DbU).(⬆)
- If the current ADR is lower, it indicates that volatility has decreased compared to ADR (DbU).(⬇)
Calculations:
1. Calculate ADR:
   - Average the high prices over the specified period.
   - Average the low prices over the same period.
   - Find the difference between these average values in %.
2. Current ADR vs. ADR (DbU):
   - Calculate the ADR for the current bar.
   - Calculate the ADR (DbU).
   - Compare the two values to determine if volatility has increased or decreased.
By using the ADR filter, the strategy ensures that trades are only taken in favorable market conditions where volatility meets the user's defined threshold, thus optimizing entry conditions and potentially improving the overall performance of the strategy.
  
>: Minimum required ADR for entry | %: Current ADR comparison to ADR of 14 days ago.
-----
 What's the probability filter? What are the underlying calculations? 
The probability filter is designed to enhance trade entries by using buyside liquidity and probability analysis to filter out unfavorable conditions.
This filter helps in identifying optimal entry points where the likelihood of a profitable trade is higher.
Calculations:
1. Understanding Swing highs and Swing Lows
Swing High: A Swing High is formed when there is a high with 2 lower highs to the left and right.
Swing Low: A Swing Low is formed when there is a low with 2 higher lows to the left and right.
2. Understanding the purpose and the underlying calculations behind Buyside, Sellside and Equilibrium levels.
  
3. Understanding probability calculations
1. Upon the formation of a new range, the script waits for the price to reach and tap into equilibrium or the 50% level. Status: "⏸" - Inactive
2. Once equilibrium is tapped into, the equilibrium status becomes activated and it waits for either liquidity side to be hit. Status: "▶" - Active
3. If the buyside liquidity is hit, the script adds to the count of successful buyside liquidity occurrences. Similarly, if the sellside is tapped, it records successful sellside liquidity occurrences.
5. Finally, the number of successful occurrences for each side is divided by the overall count individually to calculate the range probabilities.
  
 Note: The calculations are performed independently for each directional range. A range is considered bearish if the previous breakout was through a sellside liquidity. Conversely, a range is considered bullish if the most recent breakout was through a buyside liquidity. 
  
Example - BSL > 50%
  
-----
 What's the sentiment Filter? What are the underlying calculations? 
Sentiment filter aims to calculate the percentage level of bullish or bearish fluctuations within equally divided price sections, in the latest price range.
Calculations:
This filter calculates the current sentiment by identifying the highest swing high and the lowest swing low, then evenly dividing the distance between them into percentage amounts. If the price is above the 50% mark, it indicates bullishness, whereas if it's below 50%, it suggests bearishness.
  
Sentiment Bias Identification:
Bullish Bias: The current price is trading above the 50% daily range.
Bearish Bias: The current price  is trading below the 50% daily range.
Example - Sentiment Enabled | Bullish degree above 50% | Bullish sentimental bias
  
>: Minimum required sentiment for entry | %: Current sentimental degree in a (Bullish/Bearish) sentimental bias
-----
 What's the range length Filter? What are the underlying calculations? 
The range length filter identifies the price distance between buyside and sellside liquidity levels in percentage terms. When enabled, the script only looks for entries when the minimum range length is met. This helps ensure that trades are taken in markets with sufficient price movement.
Calculations:
Range Length (%) = ( ( Buyside Level − Sellside Level ) / Current Price ) ×100
Range Bias Identification:
Bullish Bias: The current range price has broken above the previous external swing high.
Bearish Bias: The current range price has broken below the previous external swing low.
Example - Range length filter is enabled | Range must be above 5% | Price must be in a bearish range
  
>: Minimum required range length for entry | %: Current range length percentage in a (Bullish/Bearish) range
-----
 What's the day filter Filter, what does it do? 
The day filter allows users to customize the session time and choose the specific days they want to include in the strategy session. This helps traders tailor their strategies to particular trading sessions or days of the week when they believe the market conditions are more favorable for their trading style.
Customize Session Time:
Users can define the start and end times for the trading session.
This allows the strategy to only consider trades within the specified time window, focusing on periods of higher market activity or preferred trading hours.
Select Days:
Users can select which days of the week to include in the strategy.
This feature is useful for excluding days with historically lower volatility or unfavorable trading conditions (e.g., Mondays or Fridays).
Benefits:
Focus on Optimal Trading Periods: 
By customizing session times and days, traders can focus on periods when the market is more likely to present profitable opportunities.
Avoid Unfavorable Conditions:
Excluding specific days or times can help avoid trading during periods of low liquidity or high unpredictability, such as major news events or holidays.
Increased Flexibility: The filter provides increased flexibility, allowing traders to adapt the strategy to their specific needs and preferences.
Example - Day filter | Session Filter
  
θ: Session time | Exchange time-zone
-----
 What tables are available in this script? 
Table Type:
- Summary: Provides a general overview, displaying key performance parameters such as Net Profit, Profit Factor, Max Drawdown, Average Trade, Closed Trades, Compound Annual Growth Rate (CAGR), MAR and more.
CAGR: It calculates the 'Compound Annual Growth Rate' first and last taken trades on your chart. The CAGR is a notional, annualized growth rate that assumes all profits are reinvested. It only takes into account the prices of the two end points — not drawdowns, so it does not calculate risk. It can be used as a yardstick to compare the performance of two strategies. Since it annualizes values, it requires a minimum 4H timeframe to display the CAGR value. annualizing returns over smaller periods of times doesn't produce very meaningful figures.
MAR: Measure of return adjusted for risk: CAGR divided by Max Drawdown. Indicates how comfortable the system might be to trade. Higher than 0.5 is ideal, 1.0 and above is very good, and anything above 3.0 should be considered suspicious and you need to make sure the total number of trades are high enough by running a Deep Backtest in strategy tester. (available for TradingView Premium users.)
Avg Trade: The sum of money gained or lost by the average trade generated by a strategy. Calculated by dividing the Net Profit by the overall number of closed trades. An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.
MaxDD: Displays the largest drawdown of losses, i.e., the maximum possible loss that the strategy could have incurred among all of the trades it has made. This value is calculated separately for every bar that the strategy spends with an open position.
Profit Factor: The amount of money a trading strategy made for every unit of money it lost (in the selected currency). This value is calculated by dividing gross profits by gross losses.
Avg RR: This is calculated by dividing the average winning trade by the average losing trade. This field is not a very meaningful value by itself because it does not take into account the ratio of the number of winning vs losing trades, and strategies can have different approaches to profitability. A strategy may trade at every possibility in order to capture many small profits, yet have an average losing trade greater than the average winning trade. The higher this value is, the better, but it should be considered together with the percentage of winning trades and the net profit.
Winrate: The percentage of winning trades generated by a strategy. Calculated by dividing the number of winning trades by the total number of closed trades generated by a strategy. Percent profitable is not a very reliable measure by itself. A strategy could have many small winning trades, making the percent profitable high with a small average winning trade, or a few big winning trades accounting for a low percent profitable and a big average winning trade. Most trend-following successful strategies have a percent profitability of 15-40% but are profitable due to risk management control.
BE Trades: Number of break-even trades, excluding commission/slippage.
Losing Trades: The total number of losing trades generated by the strategy.
Winning Trades: The total number of winning trades generated by the strategy.
Total Trades: Total number of taken traders visible your charts.
Net Profit: The overall profit or loss (in the selected currency) achieved by the trading strategy in the test period. The value is the sum of all values from the Profit column (on the List of Trades tab), taking into account the sign.
  
- Monthly: Displays performance data on a month-by-month basis, allowing users to analyze performance trends over each month.
  
- Weekly: Displays performance data on a week-by-week basis, helping users to understand weekly performance variations.
  
- OFF: Hides the performance table.
Labels:
- OFF: Hides labels in the performance table.
- PnL: Shows the profit and loss of each trade individually, providing detailed insights into the performance of each trade.
  
- Range: Shows the range length and Average Day Range (ADR), offering additional context about market conditions during each trade.
  
Profit Color:
- Allows users to set the color for representing profit in the performance table, helping to quickly distinguish profitable periods.
Loss Color:
- Allows users to set the color for representing loss in the performance table, helping to quickly identify loss-making periods.
These customizable tables provide traders with flexible and detailed performance analysis, aiding in better strategy evaluation and optimization.
  
-----
 User-input styles and customizations: 
To facilitate studying historical data, all conditions and rules can be applied to your charts. By plotting background colors on your charts, you'll be able to identify what worked and what didn't in certain market conditions.
Please note that all background colors in the style are disabled by default to enhance visualization.
  
-----
 How to Use This Algobuilder to Create a Profitable Edge and System: 
 Choose Your Strategy mode: 
- Decide whether you are creating an investing strategy or a trading strategy.
 Select a Market: 
- Choose a one-sided market such as stocks, indices, or cryptocurrencies.
 Historical Data: 
- Ensure the historical data covers at least 10 years of price action for robust backtesting.
 Timeframe Selection: 
- Choose the timeframe you are comfortable trading with. It is strongly recommended to use a timeframe above 15 minutes to minimize the impact of commissions on your profits.
 Set Commission and Slippage: 
- Properly set the commission and slippage in the strategy properties according to your broker or prop firm specifications.
 Parameter Optimization: 
- Use trial and error to test different parameters until you find the performance results you are looking for in the summary table or, preferably, through deep backtesting using the strategy tester.
 Trade Count: 
- Ensure the number of trades is 100 or more; the higher, the better for statistical significance.
 Positive Average Trade: 
- Make sure the average trade value is above zero.
 (An important value since it must be large enough to cover the commission and slippage costs of trading the strategy and still bring a profit.) 
 Performance Metrics: 
- Look for a high profit factor, MAR (Mar Ratio), CAGR (Compound Annual Growth Rate), and net profit with minimum drawdown. Ideally, aim for a drawdown under 20-30%, depending on your risk tolerance.
 Refinement and Optimization: 
- Try out different markets and timeframes.
- Continue working on refining your edge using the available filters and components to further optimize your strategy.
 Automation: 
- Once you’re confident in your strategy, you can use the automation section to connect the algorithm to your broker or prop firm.
- Trade a fully automated and backtested trading strategy, allowing for hands-free execution and management.
-----
 What makes this strategy original? 
1. Incorporating direct integration of probabilities into the strategy.
2. Leveraging market sentiment to construct a profitable approach.
3. Utilizing built-in market structure-based trailing stop-loss mechanisms across various timeframes.
4. Offering both investing and trading strategies, facilitating optimization from different perspectives.
5. Automation for efficient execution.
6. Providing a summary table for instant access to key parameters of the strategy.
-----
 How to use automation? 
 For Traders: 
1. Ensure the strategy parameters are properly set based on your optimized parameters.
2. Enter your PineConnector License ID in the designated field.
3. Specify the desired risk level.
4. Provide the Metatrader symbol.
5. Check for chart updates to ensure the automation table appears on the top right corner, displaying your License ID, risk, and symbol.
6. Set up an alert with the strategy selected as Condition and the Message as {{strategy.order.alert_message}}.
7. Activate the Webhook URL in the Notifications section, setting it as the official PineConnector webhook address.
8. Double-check all settings on PineConnector to ensure the connection is successful.
9. Create the alert for entry/exit automation.
 For Investors: 
1. Ensure the strategy parameters are properly set based on your optimized parameters.
2. Choose "Investing" in the user-input settings.
3. Create an alert with a specified name.
4. Customize the notifications tab to receive alerts via email.
5. Buying/selling alerts will be triggered instantly upon entry or exit order execution.
----
 Strategy Properties 
This script backtest is done on 4H  COINBASE:BTCUSD  , using the following backtesting properties:
Balance: $5000
Order Size: 10% of the equity
Risk % per trade: 1%
Commission: 0.04% (Default commission percentage according to TradingView competitions rules)
Slippage: 75 ticks
Pyramiding: 2
-----
 Terms and Conditions | Disclaimer 
 Our charting tools are provided for informational and educational purposes only and should not be construed as financial, investment, or trading advice. They are not intended to forecast market movements or offer specific recommendations. Users should understand that past performance does not guarantee future results and should not base financial decisions solely on historical data. 
Built-in components, features, and functionalities of our charting tools are the intellectual property of @Fractalyst Unauthorized use, reproduction, or distribution of these proprietary elements is prohibited.
 
 By continuing to use our charting tools, the user acknowledges and accepts the Terms and Conditions outlined in this legal disclaimer and agrees to respect our intellectual property rights and comply with all applicable laws and regulations.
Supertrend Advance Pullback StrategyHandbook for the Supertrend Advance Strategy 
 1. Introduction
Purpose of the Handbook: 
The main purpose of this handbook is to serve as a comprehensive guide for traders and investors who are looking to explore and harness the potential of the Supertrend Advance Strategy. In the rapidly changing financial market, having the right tools and strategies at one's disposal is crucial. Whether you're a beginner hoping to dive into the world of trading or a seasoned investor aiming to optimize and diversify your portfolio, this handbook offers the insights and methodologies you need. By the end of this guide, readers should have a clear understanding of how the Supertrend Advance Strategy works, its benefits, potential pitfalls, and practical application in various trading scenarios.
 Overview of the Supertrend Advance Pullback Strategy: 
At its core, the Supertrend Advance Strategy is an evolution of the popular Supertrend Indicator. Designed to generate buy and sell signals in trending markets, the Supertrend Indicator has been a favorite tool for many traders around the world. The Advance Strategy, however, builds upon this foundation by introducing enhanced mechanisms, filters, and methodologies to increase precision and reduce false signals.
 1. Basic Concept:  
The Supertrend Advance Strategy relies on a combination of price action and volatility to determine the potential trend direction. By assessing the average true range (ATR) in conjunction with specific price points, this strategy aims to highlight the potential starting and ending points of market trends.
 2. Methodology:  
Unlike the traditional Supertrend Indicator, which primarily focuses on closing prices and ATR, the Advance Strategy integrates other critical market variables, such as volume, momentum oscillators, and perhaps even fundamental data, to validate its signals. This multidimensional approach ensures that the generated signals are more reliable and are less prone to market noise.
 3. Benefits:  
One of the main benefits of the Supertrend Advance Strategy is its ability to filter out false breakouts and minor price fluctuations, which can often lead to premature exits or entries in the market. By waiting for a confluence of factors to align, traders using this advanced strategy can increase their chances of entering or exiting trades at optimal points.
 4. Practical Applications:  
The Supertrend Advance Strategy can be applied across various timeframes, from intraday trading to swing trading and even long-term investment scenarios. Furthermore, its flexible nature allows it to be tailored to different asset classes, be it stocks, commodities, forex, or cryptocurrencies.
In the subsequent sections of this handbook, we will delve deeper into the intricacies of this strategy, offering step-by-step guidelines on its application, case studies, and tips for maximizing its efficacy in the volatile world of trading.
As you journey through this handbook, we encourage you to approach the Supertrend Advance Strategy with an open mind, testing and tweaking it as per your personal trading style and risk appetite. The ultimate goal is not just to provide you with a new tool but to empower you with a holistic strategy that can enhance your trading endeavors.
 2. Getting Started 
Navigating the financial markets can be a daunting task without the right tools. This section is dedicated to helping you set up the Supertrend Advance Strategy on one of the most popular charting platforms, TradingView. By following the steps below, you'll be able to integrate this strategy into your charts and start leveraging its insights in no time.
 Setting up on TradingView: 
TradingView is a web-based platform that offers a wide range of charting tools, social networking, and market data. Before you can apply the Supertrend Advance Strategy, you'll first need a TradingView account. If you haven't set one up yet, here's how:
 1. Account Creation: 
• Visit TradingView's official website.
• Click on the "Join for free" or "Sign up" button.
• Follow the registration process, providing the necessary details and setting up your login credentials.
 2. Navigating the Dashboard: 
• Once logged in, you'll be taken to your dashboard. Here, you'll see a variety of tools, including watchlists, alerts, and the main charting window.
• To begin charting, type in the name or ticker of the asset you're interested in the search bar at the top.
 3. Configuring Chart Settings: 
• Before integrating the Supertrend Advance Strategy, familiarize yourself with the chart settings. This can be accessed by clicking the 'gear' icon on the top right of the chart window.
• Adjust the chart type, time intervals, and other display settings to your preference.
 Integrating the Strategy into a Chart: 
Now that you're set up on TradingView, it's time to integrate the Supertrend Advance Strategy.
 1. Accessing the Pine Script Editor: 
• Located at the top-center of your screen, you'll find the "Pine Editor" tab. Click on it.
• This is where custom strategies and indicators are scripted or imported.
 2. Loading the Supertrend Advance Strategy Script: 
• Depending on whether you have the script or need to find it, there are two paths:
• If you have the script: Copy the Supertrend Advance Strategy script, and then paste it into the Pine Editor.
• If searching for the script: Click on the “Indicators” icon (looks like a flame) at the top of your screen, and then type “Supertrend Advance Strategy” in the search bar. If available, it will show up in the list. Simply click to add it to your chart.
 3. Applying the Strategy: 
• After pasting or selecting the Supertrend Advance Strategy in the Pine Editor, click on the “Add to Chart” button located at the top of the editor. This will overlay the strategy onto your main chart window.
 4. Configuring Strategy Settings: 
• Once the strategy is on your chart, you'll notice a small settings ('gear') icon next to its name in the top-left of the chart window. Click on this to access settings.
• Here, you can adjust various parameters of the Supertrend Advance Strategy to better fit your trading style or the specific asset you're analyzing.
 5. Interpreting Signals: 
• With the strategy applied, you'll now see buy/sell signals represented on your chart. Take time to familiarize yourself with how these look and behave over various timeframes and market conditions.
 3. Strategy Overview 
 What is the Supertrend Advance Strategy? 
The Supertrend Advance Strategy is a refined version of the classic Supertrend Indicator, which was developed to aid traders in spotting market trends. The strategy utilizes a combination of data points, including average true range (ATR) and price momentum, to generate buy and sell signals.
In essence, the Supertrend Advance Strategy can be visualized as a line that moves with the price. When the price is above the Supertrend line, it indicates an uptrend and suggests a potential buy position. Conversely, when the price is below the Supertrend line, it hints at a downtrend, suggesting a potential selling point.
 Strategy Goals and Objectives: 
1. Trend Identification: At the core of the Supertrend Advance Strategy is the goal to efficiently and consistently identify prevailing market trends. By recognizing these trends, traders can position themselves to capitalize on price movements in their favor.
2. Reducing Noise: Financial markets are often inundated with 'noise' - short-term price fluctuations that can mislead traders. The Supertrend Advance Strategy aims to filter out this noise, allowing for clearer decision-making.
3. Enhancing Risk Management: With clear buy and sell signals, traders can set more precise stop-loss and take-profit points. This leads to better risk management and potentially improved profitability.
4. Versatility: While primarily used for trend identification, the strategy can be integrated with other technical tools and indicators to create a comprehensive trading system.
 Type of Assets/Markets to Apply the Strategy: 
1. Equities: The Supertrend Advance Strategy is highly popular among stock traders. Its ability to capture long-term trends makes it particularly useful for those trading individual stocks or equity indices.
2. Forex: Given the 24-hour nature of the Forex market and its propensity for trends, the Supertrend Advance Strategy is a valuable tool for currency traders.
3. Commodities: Whether it's gold, oil, or agricultural products, commodities often move in extended trends. The strategy can help in identifying and capitalizing on these movements.
4. Cryptocurrencies: The volatile nature of cryptocurrencies means they can have pronounced trends. The Supertrend Advance Strategy can aid crypto traders in navigating these often tumultuous waters.
5. Futures & Options: Traders and investors in derivative markets can utilize the strategy to make more informed decisions about contract entries and exits.
It's important to note that while the Supertrend Advance Strategy can be applied across various assets and markets, its effectiveness might vary based on market conditions, timeframe, and the specific characteristics of the asset in question. As always, it's recommended to use the strategy in conjunction with other analytical tools and to backtest its effectiveness in specific scenarios before committing to trades.
 4. Input Settings 
Understanding and correctly configuring input settings is crucial for optimizing the Supertrend Advance Strategy for any specific market or asset. These settings, when tweaked correctly, can drastically impact the strategy's performance.
 Grouping Inputs: 
Before diving into individual input settings, it's important to group similar inputs. Grouping can simplify the user interface, making it easier to adjust settings related to a specific function or indicator.
 Strategy Choice: 
This input allows traders to select from various strategies that incorporate the Supertrend indicator. Options might include "Supertrend with RSI," "Supertrend with MACD," etc. By choosing a strategy, the associated input settings for that strategy become available.
 Supertrend Settings: 
1. Multiplier: Typically, a default value of 3 is used. This multiplier is used in the ATR calculation. Increasing it makes the Supertrend line further from prices, while decreasing it brings the line closer.
2. Period: The number of bars used in the ATR calculation. A common default is 7.
 EMA Settings (Exponential Moving Average): 
1. Period: Defines the number of previous bars used to calculate the EMA. Common periods are 9, 21, 50, and 200.
2. Source: Allows traders to choose which price (Open, Close, High, Low) to use in the EMA calculation.
 RSI Settings (Relative Strength Index): 
1. Length: Determines how many periods are used for RSI calculation. The standard setting is 14.
2. Overbought Level: The threshold at which the asset is considered overbought, typically set at 70.
3. Oversold Level: The threshold at which the asset is considered oversold, often at 30.
 MACD Settings (Moving Average Convergence Divergence): 
1. Short Period: The shorter EMA, usually set to 12.
2. Long Period: The longer EMA, commonly set to 26.
3. Signal Period: Defines the EMA of the MACD line, typically set at 9.
 CCI Settings (Commodity Channel Index): 
1. Period: The number of bars used in the CCI calculation, often set to 20.
2. Overbought Level: Typically set at +100, denoting overbought conditions.
3. Oversold Level: Usually set at -100, indicating oversold conditions.
 SL/TP Settings (Stop Loss/Take Profit): 
1. SL Multiplier: Defines the multiplier for the average true range (ATR) to set the stop loss.
2. TP Multiplier: Defines the multiplier for the average true range (ATR) to set the take profit.
 Filtering Conditions: 
This section allows traders to set conditions to filter out certain signals. For example, one might only want to take buy signals when the RSI is below 30, ensuring they buy during oversold conditions.
 Trade Direction and Backtest Period: 
1. Trade Direction: Allows traders to specify whether they want to take long trades, short trades, or both.
2. Backtest Period: Specifies the time range for backtesting the strategy. Traders can choose from options like 'Last 6 months,' 'Last 1 year,' etc.
It's essential to remember that while default settings are provided for many of these tools, optimal settings can vary based on the market, timeframe, and trading style. Always backtest new settings on historical data to gauge their potential efficacy.
 5. Understanding Strategy Conditions 
Developing an understanding of the conditions set within a trading strategy is essential for traders to maximize its potential. Here, we delve deep into the logic behind these conditions, using the Supertrend Advance Strategy as our focal point.
 Basic Logic Behind Conditions: 
Every strategy is built around a set of conditions that provide buy or sell signals. The conditions are based on mathematical or statistical methods and are rooted in the study of historical price data. The fundamental idea is to recognize patterns or behaviors that have been profitable in the past and might be profitable in the future.
 Buy and Sell Conditions: 
1. Buy Conditions: Usually formulated around bullish signals or indicators suggesting upward price momentum.
2. Sell Conditions: Centered on bearish signals or indicators indicating downward price momentum.
 Simple Strategy: 
The simple strategy could involve using just the Supertrend indicator. Here:
• Buy: When price closes above the Supertrend line.
• Sell: When price closes below the Supertrend line.
 Pullback Strategy: 
This strategy capitalizes on price retracements:
• Buy: When the price retraces to the Supertrend line after a bullish signal and is supported by another bullish indicator.
• Sell: When the price retraces to the Supertrend line after a bearish signal and is confirmed by another bearish indicator.
 Indicators Used: 
EMA (Exponential Moving Average):
• Logic: EMA gives more weight to recent prices, making it more responsive to current price movements. A shorter-period EMA crossing above a longer-period EMA can be a bullish sign, while the opposite is bearish.
RSI (Relative Strength Index):
• Logic: RSI measures the magnitude of recent price changes to analyze overbought or oversold conditions. Values above 70 are typically considered overbought, and values below 30 are considered oversold.
MACD (Moving Average Convergence Divergence):
• Logic: MACD assesses the relationship between two EMAs of a security’s price. The MACD line crossing above the signal line can be a bullish signal, while crossing below can be bearish.
CCI (Commodity Channel Index):
• Logic: CCI compares a security's average price change with its average price variation. A CCI value above +100 may mean the price is overbought, while below -100 might signify an oversold condition.
And others...
As the strategy expands or contracts, more indicators might be added or removed. The crucial point is to understand the core logic behind each, ensuring they align with the strategy's objectives.
 Logic Behind Each Indicator: 
1. EMA: Emphasizes recent price movements; provides dynamic support and resistance levels.
2. RSI: Indicates overbought and oversold conditions based on recent price changes.
3. MACD: Showcases momentum and direction of a trend by comparing two EMAs.
4. CCI: Measures the difference between a security's price change and its average price change.
Understanding strategy conditions is not just about knowing when to buy or sell but also about comprehending the underlying market dynamics that those conditions represent. As you familiarize yourself with each condition and indicator, you'll be better prepared to adapt and evolve with the ever-changing financial markets.
 6. Trade Execution and Management 
Trade execution and management are crucial aspects of any trading strategy. Efficient execution can significantly impact profitability, while effective management can preserve capital during adverse market conditions. In this section, we'll explore the nuances of position entry, exit strategies, and various Stop Loss (SL) and Take Profit (TP) methodologies within the Supertrend Advance Strategy.
 Position Entry: 
Effective trade entry revolves around:
1. Timing: Enter at a point where the risk-reward ratio is favorable. This often corresponds to confirmatory signals from multiple indicators.
2. Volume Analysis: Ensure there's adequate volume to support the movement. Volume can validate the strength of a signal.
3. Confirmation: Use multiple indicators or chart patterns to confirm the entry point. For instance, a buy signal from the Supertrend indicator can be confirmed with a bullish MACD crossover.
 Position Exit Strategies: 
A successful exit strategy will lock in profits and minimize losses. Here are some strategies:
1. Fixed Time Exit: Exiting after a predetermined period.
2. Percentage-based Profit Target: Exiting after a certain percentage gain.
3. Indicator-based Exit: Exiting when an indicator gives an opposing signal.
 Percentage-based SL/TP: 
• Stop Loss (SL): Set a fixed percentage below the entry price to limit potential losses.
• Example: A 2% SL on an entry at $100 would trigger a sell at $98.
• Take Profit (TP): Set a fixed percentage above the entry price to lock in gains.
• Example: A 5% TP on an entry at $100 would trigger a sell at $105.
 Supertrend-based SL/TP: 
• Stop Loss (SL): Position the SL at the Supertrend line. If the price breaches this line, it could indicate a trend reversal.
• Take Profit (TP): One could set the TP at a point where the Supertrend line flattens or turns, indicating a possible slowdown in momentum.
 Swing high/low-based SL/TP: 
• Stop Loss (SL): For a long position, set the SL just below the recent swing low. For a short position, set it just above the recent swing high.
• Take Profit (TP): For a long position, set the TP near a recent swing high or resistance. For a short position, near a swing low or support.
 And other methods... 
1. Trailing Stop Loss: This dynamic SL adjusts with the price movement, locking in profits as the trade moves in your favor.
2. Multiple Take Profits: Divide the position into segments and set multiple TP levels, securing profits in stages.
3. Opposite Signal Exit: Exit when another reliable indicator gives an opposite signal.
Trade execution and management are as much an art as they are a science. They require a blend of analytical skill, discipline, and intuition. Regularly reviewing and refining your strategies, especially in light of changing market conditions, is crucial to maintaining consistent trading performance.
 7. Visual Representations 
Visual tools are essential for traders, as they simplify complex data into an easily interpretable format. Properly analyzing and understanding the plots on a chart can provide actionable insights and a more intuitive grasp of market conditions. In this section, we’ll delve into various visual representations used in the Supertrend Advance Strategy and their significance.
 Understanding Plots on the Chart: 
Charts are the primary visual aids for traders. The arrangement of data points, lines, and colors on them tell a story about the market's past, present, and potential future moves.
1. Data Points: These represent individual price actions over a specific timeframe. For instance, a daily chart will have data points showing the opening, closing, high, and low prices for each day.
2. Colors: Used to indicate the nature of price movement. Commonly, green is used for bullish (upward) moves and red for bearish (downward) moves.
 Trend Lines: 
Trend lines are straight lines drawn on a chart that connect a series of price points. Their significance:
1. Uptrend Line: Drawn along the lows, representing support. A break below might indicate a trend reversal.
2. Downtrend Line: Drawn along the highs, indicating resistance. A break above might suggest the start of a bullish trend.
 Filled Areas: 
These represent a range between two values on a chart, usually shaded or colored. For instance:
1. Bollinger Bands: The area between the upper and lower band is filled, giving a visual representation of volatility.
2. Volume Profile: Can show a filled area representing the amount of trading activity at different price levels.
 Stop Loss and Take Profit Lines: 
These are horizontal lines representing pre-determined exit points for trades.
1. Stop Loss Line: Indicates the level at which a trade will be automatically closed to limit losses. Positioned according to the trader's risk tolerance.
2. Take Profit Line: Denotes the target level to lock in profits. Set according to potential resistance (for long trades) or support (for short trades) or other technical factors.
 Trailing Stop Lines: 
A trailing stop is a dynamic form of stop loss that moves with the price. On a chart:
1. For Long Trades: Starts below the entry price and moves up with the price but remains static if the price falls, ensuring profits are locked in.
2. For Short Trades: Starts above the entry price and moves down with the price but remains static if the price rises.
Visual representations offer traders a clear, organized view of market dynamics. Familiarity with these tools ensures that traders can quickly and accurately interpret chart data, leading to more informed decision-making. Always ensure that the visual aids used resonate with your trading style and strategy for the best results.
 8. Backtesting 
Backtesting is a fundamental process in strategy development, enabling traders to evaluate the efficacy of their strategy using historical data. It provides a snapshot of how the strategy would have performed in past market conditions, offering insights into its potential strengths and vulnerabilities. In this section, we'll explore the intricacies of setting up and analyzing backtest results and the caveats one must be aware of.
 
Setting Up Backtest Period: 
1. Duration: Determine the timeframe for the backtest. It should be long enough to capture various market conditions (bullish, bearish, sideways). For instance, if you're testing a daily strategy, consider a period of several years.
2. Data Quality: Ensure the data source is reliable, offering high-resolution and clean data. This is vital to get accurate backtest results.
3. Segmentation: Instead of a continuous period, sometimes it's helpful to backtest over distinct market phases, like a particular bear or bull market, to see how the strategy holds up in different environments.
 Analyzing Backtest Results: 
1. Performance Metrics: Examine metrics like the total return, annualized return, maximum drawdown, Sharpe ratio, and others to gauge the strategy's efficiency.
2. Win Rate: It's the ratio of winning trades to total trades. A high win rate doesn't always signify a good strategy; it should be evaluated in conjunction with other metrics.
3. Risk/Reward: Understand the average profit versus the average loss per trade. A strategy might have a low win rate but still be profitable if the average gain far exceeds the average loss.
4. Drawdown Analysis: Review the periods of losses the strategy could incur and how long it takes, on average, to recover.
 9. Tips and Best Practices 
Successful trading requires more than just knowing how a strategy works. It necessitates an understanding of when to apply it, how to adjust it to varying market conditions, and the wisdom to recognize and avoid common pitfalls. This section offers insightful tips and best practices to enhance the application of the Supertrend Advance Strategy.
 When to Use the Strategy: 
1. Market Conditions: Ideally, employ the Supertrend Advance Strategy during trending market conditions. This strategy thrives when there are clear upward or downward trends. It might be less effective during consolidative or sideways markets.
2. News Events: Be cautious around significant news events, as they can cause extreme volatility. It might be wise to avoid trading immediately before and after high-impact news.
3. Liquidity: Ensure you are trading in assets/markets with sufficient liquidity. High liquidity ensures that the price movements are more reflective of genuine market sentiment and not due to thin volume.
 Adjusting Settings for Different Markets/Timeframes: 
1. Markets: Each market (stocks, forex, commodities) has its own characteristics. It's essential to adjust the strategy's parameters to align with the market's volatility and liquidity.
2. Timeframes: Shorter timeframes (like 1-minute or 5-minute charts) tend to have more noise. You might need to adjust the settings to filter out false signals. Conversely, for longer timeframes (like daily or weekly charts), you might need to be more responsive to genuine trend changes.
3. Customization: Regularly review and tweak the strategy's settings. Periodic adjustments can ensure the strategy remains optimized for the current market conditions.
 10. Frequently Asked Questions (FAQs) 
Given the complexities and nuances of the Supertrend Advance Strategy, it's only natural for traders, both new and seasoned, to have questions. This section addresses some of the most commonly asked questions regarding the strategy.
1. What exactly is the Supertrend Advance Strategy?
The Supertrend Advance Strategy is an evolved version of the traditional Supertrend indicator. It's designed to provide clearer buy and sell signals by incorporating additional indicators like EMA, RSI, MACD, CCI, etc. The strategy aims to capitalize on market trends while minimizing false signals.
2. Can I use the Supertrend Advance Strategy for all asset types?
Yes, the strategy can be applied to various asset types like stocks, forex, commodities, and cryptocurrencies. However, it's crucial to adjust the settings accordingly to suit the specific characteristics and volatility of each asset type.
3. Is this strategy suitable for day trading?
Absolutely! The Supertrend Advance Strategy can be adjusted to suit various timeframes, making it versatile for both day trading and long-term trading. Remember to fine-tune the settings to align with the timeframe you're trading on.
4. How do I deal with false signals?
No strategy is immune to false signals. However, by combining the Supertrend with other indicators and adhering to strict risk management protocols, you can minimize the impact of false signals. Always use stop-loss orders and consider filtering trades with additional confirmation signals.
5. Do I need any prior trading experience to use this strategy?
While the Supertrend Advance Strategy is designed to be user-friendly, having a foundational understanding of trading and market analysis can greatly enhance your ability to employ the strategy effectively. If you're a beginner, consider pairing the strategy with further education and practice on demo accounts.
6. How often should I review and adjust the strategy settings?
There's no one-size-fits-all answer. Some traders adjust settings weekly, while others might do it monthly. The key is to remain responsive to changing market conditions. Regular backtesting can give insights into potential required adjustments.
7. Can the Supertrend Advance Strategy be automated?
Yes, many traders use algorithmic trading platforms to automate their strategies, including the Supertrend Advance Strategy. However, always monitor automated systems regularly to ensure they're operating as intended.
8. Are there any markets or conditions where the strategy shouldn't be used?
The strategy might generate more false signals in markets that are consolidative or range-bound. During significant news events or times of unexpected high volatility, it's advisable to tread with caution or stay out of the market.
9. How important is backtesting with this strategy?
Backtesting is crucial as it allows traders to understand how the strategy would have performed in the past, offering insights into potential profitability and areas of improvement. Always backtest any new setting or tweak before applying it to live trades.
10. What if the strategy isn't working for me?
No strategy guarantees consistent profits. If it's not working for you, consider reviewing your settings, seeking expert advice, or complementing the Supertrend Advance Strategy with other analysis methods. Remember, continuous learning and adaptation are the keys to trading success.
 Other comments 
Value of combining several indicators in this script and how they work together
Diversification of Signals: Just as diversifying an investment portfolio can reduce risk, using multiple indicators can offer varied perspectives on potential price movements. Each indicator can capture a different facet of the market, ensuring that traders are not overly reliant on a single data point.
Confirmation & Reduced False Signals: A common challenge with many indicators is the potential for false signals. By requiring confirmation from multiple indicators before acting, the chances of acting on a false signal can be significantly reduced.
Flexibility Across Market Conditions: Different indicators might perform better under different market conditions. For example, while moving averages might excel in trending markets, oscillators like RSI might be more useful during sideways or range-bound conditions. A mashup strategy can potentially adapt better to varying market scenarios.
Comprehensive Analysis: With multiple indicators, traders can gauge trend strength, momentum, volatility, and potential market reversals all at once, providing a holistic view of the market.
How do the different indicators in the Supertrend Advance Strategy work together?
Supertrend: This is primarily a trend-following indicator. It provides traders with buy and sell signals based on the volatility of the price. When combined with other indicators, it can filter out noise and give more weight to strong, confirmed trends.
EMA (Exponential Moving Average): EMA gives more weight to recent price data. It can be used to identify the direction and strength of a trend. When the price is above the EMA, it's generally considered bullish, and vice versa.
RSI (Relative Strength Index): An oscillator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. By cross-referencing with other indicators like EMA or MACD, traders can spot potential reversals or confirmations of a trend.
MACD (Moving Average Convergence Divergence): This indicator identifies changes in the strength, direction, momentum, and duration of a trend in a stock's price. When the MACD line crosses above the signal line, it can be a bullish sign, and when it crosses below, it can be bearish. Pairing MACD with Supertrend can provide dual confirmation of a trend.
CCI (Commodity Channel Index): Initially developed for commodities, CCI can indicate overbought or oversold conditions. It can be used in conjunction with other indicators to determine entry and exit points.
In essence, the synergy of these indicators provides a balanced, comprehensive approach to trading. Each indicator offers its unique lens into market conditions, and when they align, it can be a powerful indication of a trading opportunity. This combination not only reduces the potential drawbacks of each individual indicator but leverages their strengths, aiming for more consistent and informed trading decisions.
 Backtesting and Default Settings 
• This indicator has been optimized to be applied for 1 hour-charts. However, the underlying principles of this strategy are supply and demand in the financial markets and the strategy can be applied to all timeframes. Daytraders can use the 1min- or 5min charts, swing-traders can use the daily charts.
• This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
• The combination of the qualifiers results in a highly selective strategy which only considers the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
• Consequently, traders need to apply this strategy for a full watchlist rather than just one financial security.
• Default properties: RSI on (length 14, RSI buy level 50, sell level 50), EMA, RSI, MACD on, type of strategy pullback, SL/TP type: ATR (length 10, factor 3), trade direction both, quantity 5, take profit swing hl 5.1, highest / lowest lookback 2, enable ATR trail (ATR length 10, SL ATR multiplier 1.4, TP multiplier 2.1, lookback = 4, trade direction = both).
Smoothed Heikin Ashi Trend on Chart - TraderHalai BACKTESTSmoothed Heikin Ashi Trend on chart - Backtest 
This is a backtest of the Smoothed Heikin Ashi Trend indicator, which computes the reverse candle close price required to flip a Heikin Ashi trend from red to green and vice versa. The original indicator can be found in the scripts section of my profile.
This particular back test uses this indicator with a Trend following paradigm with a percentage-based stop loss. 
Note, that backtesting performance is not always indicative of future performance, but it does provide some basis for further development and walk-forward / live testing.
Testing was performed on Bitcoin , as this is a primary target market for me to use this kind of strategy.
 Sample Backtesting results as of 10th June 2022: 
Backtesting parameters:
Position size: 10% of equity
Long stop: 1% below entry
Short stop: 1% above entry
Repainting: Off
Smoothing: SMA
Period: 10
 8 Hour: 
Number of Trades: 1046
Gross Return: 249.27 %
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 28.01 %
Profit Factor (Expectancy): 2.019 
Average Loss: 0.33 % 
Average Win: 1.69 %
Average Time for Loss: 1 day
Average Time for Win: 5.33 days
 1 Day:
 
Number of Trades: 429
Gross Return: 458.4 %
CAGR Return: 15.76 %
Max Drawdown: 6.37 %
Profit Factor (Expectancy): 2.804
Average Loss: 0.8 % 
Average Win: 7.2 %
Average Time for Loss: 3 days
Average Time for Win: 16 days
 5 Day: 
Number of Trades: 69
Gross Return: 1614.9 %
CAGR Return: 26.7 %
Max Drawdown: 5.7 %
Profit Factor (Expectancy): 10.451
Average Loss: 3.64 %
Average Win: 81.17 %
Average Time for Loss: 15 days
Average Time for Win: 85 days
 Analysis: 
The strategy is typical amongst trend following strategies with a less regular win rate, but where profits are more significant than losses. Most of the losses are in sideways, low volatility markets. This strategy performs better on higher timeframes, where it shows a positive expectancy of the strategy.
 The average win was positively impacted by Bitcoin’s earlier smaller market cap, as the percentage wins earlier were higher.
 Overall the strategy shows potential for further development and may be suitable for walk-forward testing and out of sample analysis to be considered for a demo trading account.
Note in an actual trading setup, you may wish to use this with volatility filters, combined with support resistance zones for a better setup.
As always, this post/indicator/strategy is not financial advice, and please do your due diligence before trading this live.
 Original indicator links: 
On chart version -
Oscillator version -
 Update - 27/06/2022 
Unfortunately, It appears that the original script had been taken down due to auto-moderation because of concerns with no slippage / commission. I have since adjusted the backtest, and re-uploaded to include the following to address these concerns, and show that I am genuinely trying to give back to the community and not mislead anyone:
1) Include commission of 0.1% - to match Binance's maker fees prior to moving to a fee-less model.
2) Include slippage of 10 ticks (This is a realistic slippage figure from searching online for most crypto exchanges)
3) Adjust account balance to 10,000 - since most of us are not millionaires.
The rest of the backtesting parameters are comparable to previous results:
Backtesting parameters:
Initial capital: 10000 dollars
Position size: 10% of equity
Long stop: 2% below entry
Short stop: 2% above entry
Repainting: Off
Smoothing: SMA
Period: 10
Slippage: 10 ticks
Commission: 0.1%
This script still remains to shows viability / profitablity on higher term timeframes (with slightly higher drawdown), and I have included the backtest report below to document my findings:
 8 Hour: 
Number of Trades: 1082
Gross Return: 233.02%
CAGR Return: 14.04 %
Max Drawdown: 7.9 %
Win percentage: 25.6%
Profit Factor (Expectancy): 1.627
Average Loss: 0.46 % 
Average Win: 2.18 %
Average Time for Loss: 1.33 day
Average Time for Win: 7.33 days
Once again, please do your own research and due dillegence before trading this live. This post is for education and information purposes only, and should not be taken as financial advice.
Adaptive ATR Trailing Stops█  Introduction 
This script is based on the average true range (ATR) and has been improved with the HHV or LLV. The script supports the trader to have his stoploss trailed. In this case, the stoploss is dynamic and can be adjusted with each candleclose.
█  What Does This Indicator Do? 
The ATR SL Trailing Indicator helps you dynamically adjust your stop-loss levels based on market movements. It uses market volatility to calculate trailing stop-loss levels, ensuring you can secure profits or minimize losses. The indicator creates two lines:
A green/red line for long positions (when you’re betting on prices going up).
A green/red line for short positions (when you’re betting on prices going down).
█  Key Concepts: How Does the Indicator Work? 
The Average True Range (ATR) measures market volatility, showing how much the price moves over a specific period.
A high ATR indicates a volatile market (large price swings), while a low ATR indicates a quiet market (smaller price changes).
Why is ATR important? ATR helps dynamically adjust the distance between your stop-loss and the current price. In volatile markets, the stop-loss is placed further away to avoid being triggered by short-term fluctuations. In quieter markets, the stop-loss is set closer to the price.
The HHV is the highest price over a specific period. For long positions, the indicator uses the highest price minus an ATR-based value to determine the stop-loss level.
Why is HHV important? HHV ensures the stop-loss for long positions only moves up when the price reaches new highs. Once the price starts falling, the stop-loss remains unchanged to lock in profits or minimize losses.
The LLV is the lowest price over a specific period. For short positions, the indicator uses the lowest price plus an ATR-based value to determine the stop-loss level.
Why is LLV important? LLV ensures the stop-loss for short positions only moves down when the price reaches new lows. Once the price starts rising, the stop-loss remains unchanged to lock in profits or minimize losses.
█  How Does the Indicator Work? 
For Long Positions:
The indicator sets the stop-loss below the current price, based on:
Market volatility (ATR).
The highest price over a specific period (HHV).
The line turns green when the current price is above the stop-loss.
The line turns red when the price drops below the stop-loss, signaling you may need to exit the trade.
For Short Positions:
The indicator sets the stop-loss above the current price, based on:
*Market volatility (ATR).
*The lowest price over a specific period (LLV).
*The line turns green when the current price is below the stop-loss.
*The line turns red when the price moves above the stop-loss, signaling you may need to exit the trade.
█  Advantages of the ATR SL Trailing Indicator 
*Dynamic and adaptive: Automatically adjusts stop-loss levels based on market volatility.
*Visual clarity: Green and red lines clearly indicate whether your position is safe or at risk.
*Effective risk management: Helps you lock in profits and minimize losses without the need for constant manual adjustments.
█  When Should You Use This Indicator? 
*If you practice trend-based trading and want your stop-losses to automatically adapt to market movements.
*In volatile markets, to avoid being stopped out by short-term fluctuations.
*When you want to implement efficient risk management without manually adjusting your positions.
█  Inputs 
The user can set the indicator for both longs and shorts. This is particularly important because the calculation is different. The HHV is used for longs and the LLV for shorts. The user can therefore set the period/length for the ATR on the one hand and the HHV/LLV on the other. He also has a multiplier, which can also be customized. The multiplier multiplies the price change of each individual candle.
█  Color Change 
If the SL is trailed and the price breaks a line, the color changes. In this case, it would have executed the SL on an open trade.






















